Application program updating method and device, equipment, storage medium and program product

By obtaining resource inventory, downloading and merging incremental packages and using hash validation methods, the invisible update of client applications is achieved, solving the problem that user manual operations affects the experience, and improving the automation and security of updates.

CN120560697APending Publication Date: 2025-08-29GUANGDONG ELECTRIC POWER COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510425490.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-08-29

AI Technical Summary

Technical Problem

An existing client application update requires manual operation or restart of the user, affecting the user experience.

Method used

By obtaining resource inventory from the server, downloading incremental packages and merging resource packages, verifying updated applications with hash values, no need for user manual operations or restarts.

Benefits of technology

It realizes invisible updates of client applications, improves the accuracy and security of user experience and downloads, reduces traffic consumption, and improves network resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120560697A_ABST
    Figure CN120560697A_ABST
Patent Text Reader

Abstract

The invention discloses an application program updating method and device, equipment, a storage medium and a program product. The method comprises the following steps: acquiring a resource list of an application program from a server; the resource list comprises the latest version number of the application program; under the condition that the latest version number is determined to be different from the current version number corresponding to the locally stored application program, downloading an increment package from the server; the incremental packet is generated by the server based on a new resource packet corresponding to the latest version number and a current resource packet corresponding to the current version number; combining the incremental packet with the current resource packet to obtain a combined resource packet; determining a first hash value corresponding to the merged resource packet and a second hash value corresponding to the new resource packet; the second hash value is carried in a resource list; and under the condition of determining that the first hash value is the same as the second hash value, taking the application program corresponding to the merged resource packet as an updated application program. By adopting the method, non-inductive updating of the client application program can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of mobile application technology, and in particular to an application updating method, apparatus, device, storage medium, and program product. Background Art

[0002] With the rapid development of mobile Internet, users have higher and higher requirements for the user experience of client applications. However, during the update process of existing client applications, users usually need to manually operate or restart the application, which affects the user experience.

[0003] Therefore, how to achieve seamless updates of client applications has become an urgent problem to be solved. Summary of the Invention

[0004] The embodiments of the present application provide a method, apparatus, device, storage medium, and program product for updating an application program, which can achieve seamless updating of mobile application programs.

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

[0006] Get the application's resource list from the server; the resource list includes the latest version number of the application;

[0007] If it is determined that the latest version number is different from the current version number of the locally stored application, an incremental package is downloaded from the server; the incremental package is generated by the server based on the new resource package corresponding to the latest version number and the current resource package corresponding to the current version number;

[0008] Merge the incremental package and the current resource package to obtain a merged resource package;

[0009] Determine a first hash value corresponding to the merged resource package and a second hash value corresponding to the new resource package; the second hash value is carried in the resource list;

[0010] When it is determined that the first hash value is the same as the second hash value, the application corresponding to the merged resource package is used as the updated application.

[0011] In one embodiment, the method further includes: periodically sending first information to the server, the first information including the third hash value corresponding to the current resource package; receiving an incremental package address from the server, the incremental package address being sent to the client by the server when it is determined that the third hash value is different from the second hash value corresponding to the new resource package; and downloading the incremental package from the server via the incremental package address.

[0012] In one embodiment, obtaining a resource list of an application from a server includes: upon detecting a startup operation for the application, sending second information to the server, the second information being used to request obtaining a resource list corresponding to the application; and receiving the resource list from the server.

[0013] In one embodiment, the method further includes: retaining the current resource package; and loading the current version of the application corresponding to the current resource package when the updated application fails to load.

[0014] In one embodiment, the method further includes: obtaining current environment information when a startup operation for an updated application is detected; loading target content that matches the current environment information based on the current environment information and preset matching rules, and displaying the target content.

[0015] In one embodiment, the method further includes: obtaining the target object's historical access logs for the application; analyzing the historical access logs, and determining, based on the analysis results, pages whose access frequency is greater than a preset access frequency threshold; preloading static resources corresponding to the pages, and storing the static resources locally; and when it is detected that the target object launches an updated application, obtaining the static resources from the local area, and generating a page based on the static resources.

[0016] In a second aspect, the present application provides an application updating device, the device comprising:

[0017] The acquisition module is used to obtain the resource list of the application from the server; the resource list includes the latest version number of the application;

[0018] A download module is used to download an incremental package from the server when it is determined that the latest version number is different from the current version number of the locally stored application; the incremental package is generated by the server based on the new resource package corresponding to the latest version number and the current resource package corresponding to the current version number;

[0019] The merging module is used to merge the incremental package with the current resource package to obtain the merged resource package;

[0020] A determination module, configured to determine a first hash value corresponding to the merged resource package and a second hash value corresponding to the new resource package; the second hash value is carried in the resource list;

[0021] The determination module is further configured to, when it is determined that the first hash value is the same as the second hash value, use the application corresponding to the merged resource package as the updated application.

[0022] In a third aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are performed:

[0023] Get the application's resource list from the server; the resource list includes the latest version number of the application;

[0024] If it is determined that the latest version number is different from the current version number of the locally stored application, an incremental package is downloaded from the server; the incremental package is generated by the server based on the new resource package corresponding to the latest version number and the current resource package corresponding to the current version number;

[0025] Merge the incremental package and the current resource package to obtain a merged resource package;

[0026] Determine a first hash value corresponding to the merged resource package and a second hash value corresponding to the new resource package; the second hash value is carried in the resource list;

[0027] When it is determined that the first hash value is the same as the second hash value, the application corresponding to the merged resource package is used as the updated application.

[0028] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0029] Get the application's resource list from the server; the resource list includes the latest version number of the application;

[0030] If it is determined that the latest version number is different from the current version number of the locally stored application, an incremental package is downloaded from the server; the incremental package is generated by the server based on the new resource package corresponding to the latest version number and the current resource package corresponding to the current version number;

[0031] Merge the incremental package and the current resource package to obtain a merged resource package;

[0032] Determine a first hash value corresponding to the merged resource package and a second hash value corresponding to the new resource package; the second hash value is carried in the resource list;

[0033] When it is determined that the first hash value is the same as the second hash value, the application corresponding to the merged resource package is used as the updated application.

[0034] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:

[0035] Get the application's resource list from the server; the resource list includes the latest version number of the application;

[0036] If it is determined that the latest version number is different from the current version number of the locally stored application, an incremental package is downloaded from the server; the incremental package is generated by the server based on the new resource package corresponding to the latest version number and the current resource package corresponding to the current version number;

[0037] Merge the incremental package and the current resource package to obtain a merged resource package;

[0038] Determine a first hash value corresponding to the merged resource package and a second hash value corresponding to the new resource package; the second hash value is carried in the resource list;

[0039] When it is determined that the first hash value is the same as the second hash value, the application corresponding to the merged resource package is used as the updated application.

[0040] The update method, apparatus, device, storage medium and program product of the above-mentioned application program are as follows: the client can obtain the resource list of the application program from the server; the resource list includes the latest version number of the application program; when it is determined that the latest version number is different from the current version number corresponding to the locally stored application program, the incremental package is downloaded from the server; the incremental package is generated by the server based on the new resource package corresponding to the latest version number and the current resource package corresponding to the current version number; the incremental package and the current resource package are merged to obtain a merged resource package; the first hash value corresponding to the merged resource package and the second hash value corresponding to the new resource package are determined; the second hash value is carried in the resource list; when it is determined that the first hash value is the same as the second hash value, the application corresponding to the merged resource package is used as the updated application program. By adopting this method, during the update process of the client application program, there is no need for the user to manually operate or restart the application, and a seamless update of the client application program can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0042] Figure 1 This is a schematic diagram of an application scenario of a method for updating an application program provided in an embodiment of the present application;

[0043] Figure 2 This is a schematic diagram of the architecture of a server provided in an embodiment of the present application;

[0044] Figure 3 This is a flowchart of a method for updating an application program provided in an embodiment of the present application;

[0045] Figure 4 This is a flowchart of another application update method provided by an embodiment of the present application;

[0046] Figure 5 This is a schematic diagram of the structure of an application updating device provided in an embodiment of the present application;

[0047] Figure 6 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0049] The following introduces the application scenarios of the application update method provided in the embodiment of the present application.

[0050] See Figure 1 , Figure 1 This is a schematic diagram of an application scenario of an application update method provided by an embodiment of the present application. Figure 1 As shown, it includes a client 101 and a server 102. The client 101 and the server 102 perform data transmission via a network.

[0051] The client 101 can obtain the resource list of the application from the server 102; the resource list includes the latest version number of the application; when it is determined that the latest version number is different from the current version number corresponding to the locally stored application, the incremental package is downloaded from the server 102; the incremental package is generated by the server 102 based on the new resource package corresponding to the latest version number and the current resource package corresponding to the current version number; the incremental package and the current resource package are merged to obtain a merged resource package; the first hash value corresponding to the merged resource package and the second hash value corresponding to the new resource package are determined; the second hash value is carried in the resource list; when it is determined that the first hash value and the second hash value are the same, the application corresponding to the merged resource package is used as the updated application. Using this method, during the update process of the client application, there is no need for the user to manually operate or restart the application, and the client application can be updated seamlessly.

[0052] Optionally, the client 101 may be a terminal device, wherein the terminal device mentioned here may include but is not limited to: a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart watch, a smart TV, a smart car terminal, etc.

[0053] Optionally, the service end 102 may be a server. The server mentioned here may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers.

[0054] See Figure 2 , Figure 2 This is a schematic diagram of the architecture of a server provided in an embodiment of the present application. Figure 2 As shown, it includes a display element 201 , an object assembly module 202 and a configuration management module 203 .

[0055] The display elements 201 include pages, themes, exhibition stands, booths, and products. Pages, themes, exhibition stands, booths, and products are abstract representations of the elements displayed in the front-end display interface of the application.

[0056] Among them, the page, as the highest-level container, can carry multiple theme modules to support the application to dynamically switch the overall layout of the display page according to the user's corresponding scenario.

[0057] A theme is a business function unit (such as an electricity application unit or an electricity bill unit). It contains visual style and interaction logic and supports cross-page reuse.

[0058] The exhibition booth is a logical abstraction based on a standard booth or a custom booth, and is used to provide a configurable display framework (such as a smart home energy consumption display module).

[0059] The booth, as the smallest display unit, corresponds to a specific business entrance (such as the "face recognition" button), which defines the binding rules between interactive behaviors and data through metadata.

[0060] Products refer to atomic-level resources (such as electricity bill calculator components), which exist in the form of independent functional modules and support dynamic loading and replacement.

[0061] The object assembly module 202 refers to a core dependency rule engine that dynamically assembles objects based on business needs. It may include multiple preset matching rules to display target content.

[0062] Optionally, the preset matching rules may include but are not limited to priority matching rules, conditional matching rules, and data-driven matching rules.

[0063] Priority matching rules, for example, prioritize energy-saving themes during peak electricity consumption periods and promotions during off-peak periods. Condition matching rules, for example, dynamically display service portals corresponding to the user's location. Data-driven matching rule history uses real-time electricity usage data to update booth content in real time.

[0064] Configuration management module 203 implements dynamic updates through a multi-level monitoring mechanism, a rule-engine-driven grayscale strategy, resource synchronization and cache optimization, and an exception-tolerant mechanism, ensuring real-time effectiveness of business configurations and system stability. The server and client can maintain a real-time communication channel through a persistent connection using the WebSocket protocol (a new network protocol based on the Transmission Control Protocol (TCP) that enables full-duplex communication between browsers and servers, allowing the server to actively send information to the client).

[0065] Grayscale strategies may include, but are not limited to, user segmentation, traffic ratio, environment isolation, dual-version coexistence, and rapid rollback. User segmentation: Targeted push of new configurations to clients based on user ID, device type (e.g., iOS / Android), and geographic location. Traffic ratio: Gradually expand the coverage of the new version's theme page by 10%, 30%, and 100%. For example, the "face recognition electricity application" feature will initially be available only to users in Region A. Environment isolation: Distinguish development, test, and production environment configurations to enable parallel updates across multiple environments. Dual-version coexistence: Both old and new configurations are maintained in Nacos (a dynamic service discovery, configuration, and service management platform that makes it easier to build cloud-native applications, providing a registration center, a configuration center, and dynamic Domain Name System (DNS) services). Clients can select versions using HTTP headers (a component of the protocol header in Hypertext Transfer Protocol (HTTP) request and response messages) or cookies (data stored locally on the user's terminal). Quick rollback: If the new configuration causes an exception (such as a theme page rendering error), the configuration management module can switch back to the old version within a certain period of time (such as 5 seconds) and trigger an alarm to notify the operation and maintenance personnel.

[0066] Resource synchronization and cache optimization include incremental resource distribution and double-write cache strategies.

[0067] The following describes an application update method provided in an embodiment of the present application.

[0068] See Figure 3 , Figure 3This is a flow chart of a method for updating an application provided by an embodiment of the present application. Figure 1 The client 101 in the example is executed. Figure 3 As shown, the updating method of the application may include but is not limited to the following steps:

[0069] S301. Obtain a resource list of the application from the server; the resource list includes the latest version number of the application.

[0070] Optionally, the resource manifest may further include a hash value of a new resource package corresponding to the latest version number of the application, and a file path corresponding to the resource package.

[0071] S302: When it is determined that the latest version number is different from the current version number corresponding to the locally stored application, an incremental package is downloaded from the server.

[0072] The incremental package is generated by the server based on the new resource package corresponding to the latest version number and the current resource package corresponding to the current version number.

[0073] In an optional embodiment, the client downloads the incremental package from the server, which can be that the client sends a request message to the server, and the server receives the request message accordingly, where the request message is used to request the incremental package; the server responds to the request message by generating an incremental package and an incremental package address based on a new resource package corresponding to the latest version number and a current resource package corresponding to the current version number; the server sends the incremental package address to the client, and the client receives the incremental package address accordingly; the client downloads the incremental package from the server through the incremental package address.

[0074] Optionally, the server generates an incremental package based on the new resource package corresponding to the latest version and the current resource package corresponding to the current version. This can be done using the BSDiff algorithm, which is used to calculate the differences between two files and can be used to generate a smaller difference file.

[0075] S303: Merge the incremental package and the current resource package to obtain a merged resource package.

[0076] In an optional embodiment, the client merges the incremental package with the current resource package to obtain a merged resource package. This may be done using a resource package merging tool. The resource package merging tool is, for example, a Gradle build tool. The Gradle build tool is a tool that integrates building, testing, publishing, and other functions, such as software packaging and generating annotation documents.

[0077] In another optional embodiment, the client merges the incremental package with the current resource package to obtain the merged resource package by calling a pre-written script program to merge the incremental package with the current resource package to obtain the merged resource package. The pre-written script program can be written by the user based on the format and structure of the incremental package and the current resource package respectively.

[0078] S304: Determine a first hash value corresponding to the merged resource package and a second hash value corresponding to the new resource package; the second hash value is carried in the resource list.

[0079] Optionally, both the first hash value and the second hash value may be MD5 values.

[0080] MD5 is a hash function that maps data of any length into a fixed-length 128-bit binary number, usually represented by a 32-bit hexadecimal number. This fixed-length value is the MD5 value (also known as the MD5 hash value or MD5 digest).

[0081] S305: When it is determined that the first hash value is the same as the second hash value, use the application corresponding to the merged resource package as the updated application.

[0082] Optionally, the client may also re-execute the step of downloading the incremental package from the server when it is determined that the first hash value is different from the second hash value, until it is determined that the first hash value is the same as the second hash value, and use the application corresponding to the merged resource package as the updated application.

[0083] In an embodiment of the present application, a client can obtain an application's resource manifest from a server; the resource manifest includes the application's latest version number; if it is determined that the latest version number is different from the current version number corresponding to the locally stored application, an incremental package is downloaded from the server; the incremental package is generated by the server based on a new resource package corresponding to the latest version number and a current resource package corresponding to the current version number; the incremental package and the current resource package are merged to obtain a merged resource package; a first hash value corresponding to the merged resource package and a second hash value corresponding to the new resource package are determined; the second hash value is carried in the resource manifest; if it is determined that the first hash value and the second hash value are the same, the application corresponding to the merged resource package is used as the updated application. Using this method, during the update process of the client application, there is no need for the user to manually operate or restart the application, thus achieving a seamless update of the client application. In addition, by comparing the hash value of the merged resource package (i.e., the first hash value) with the hash value of the new resource package (i.e., the second hash value), the method can facilitate verification of the accuracy of the downloaded incremental package and the security of data transmission.

[0084] See Figure 4 , Figure 4 This is a flow chart of another application update method provided by an embodiment of the present application. Figure 3 Compared to the update method of the application shown, Figure 4 The method shown also illustrates that the client can periodically pull incremental packages from the server. Figure 4 As shown, the updating method of the application may include but is not limited to the following steps:

[0085] S401. Obtain a resource list of the application from the server; the resource list includes the latest version number of the application.

[0086] S402: When it is determined that the latest version number is different from the current version number corresponding to the locally stored application, an incremental package is downloaded from the server.

[0087] In an optional implementation, the relevant description of steps S401 and S402 can be found in the description of the aforementioned steps S301 and S302, and will not be repeated here.

[0088] S403: Periodically send first information to the server, where the first information includes a third hash value corresponding to the current resource package.

[0089] Exemplarily, the client may send the first information to the server every 30 seconds.

[0090] In an optional embodiment, after step S403, the server may also compare the third hash value corresponding to the current resource package included in the first information with the second hash value corresponding to the new resource package, and if the comparison result is inconsistent, generate an incremental package and an incremental package address based on the current resource package and the new resource package.

[0091] S404: Receive an incremental package address from the server. The incremental package address is sent to the client by the server when it is determined that the third hash value is different from the second hash value corresponding to the new resource package.

[0092] Among them, the new resource package refers to the resource package corresponding to the latest version number.

[0093] S405: Download the incremental package from the server through the incremental package address.

[0094] S406: Merge the incremental package and the current resource package to obtain a merged resource package.

[0095] In an optional implementation, the relevant description of step S406 can be found in the description of the aforementioned step S303, which will not be repeated here.

[0096] S407: Determine the first hash value corresponding to the merged resource package and the second hash value corresponding to the new resource package; the second hash value is carried in the resource list.

[0097] In an optional implementation, the relevant description of step S407 can be found in the description of the aforementioned step S304, which will not be repeated here.

[0098] S408: When it is determined that the first hash value is the same as the second hash value, use the application corresponding to the merged resource package as the updated application.

[0099] In an embodiment of the present application, the client can obtain a resource list of an application from the server; the resource list includes the latest version number of the application; when it is determined that the latest version number is different from the current version number corresponding to the locally stored application, the client downloads an incremental package from the server, and also periodically sends a first message to the server, the first message including a third hash value corresponding to the current resource package; receives an incremental package address from the server, the incremental package address is sent to the client by the server when it is determined that the third hash value is different from the second hash value corresponding to the new resource package; downloads the incremental package from the server through the incremental package address; merges the incremental package and the current resource package to obtain a merged resource package; determines the first hash value corresponding to the merged resource package, and the second hash value corresponding to the new resource package; the second hash value is carried in the resource list; when it is determined that the first hash value is the same as the second hash value, the application corresponding to the merged resource package is used as the updated application. This dual-channel security strategy, during application updates, can prevent network jitter from preventing the inability to retrieve the resource manifest, leading to an inability to download incremental packages from the server when the latest version number in the resource manifest differs from the current version number of the locally stored application. This improves the timeliness of incremental package downloads. Furthermore, by comparing the hash value corresponding to the merged resource package (i.e., the first hash value) with the hash value corresponding to the new resource package (i.e., the second hash value), the client can verify the accuracy of the downloaded incremental package and the security of data transmission.

[0100] In addition, in the embodiment of the present application, the client only needs to download the incremental package, thereby reducing traffic consumption and improving the utilization of network resources.

[0101] In an optional embodiment, Figure 3 and Figure 4In the application update method shown, the client obtains the resource list of the application from the server, which may include: when a startup operation for the application is detected, sending second information to the server, the second information is used to request to obtain the resource list corresponding to the application; receiving the resource list from the server.

[0102] Optionally, the startup operation may be a click operation or a touch operation on the application icon, or a voice operation input on the application, such as "start application 1", etc., which is not limited here.

[0103] In an optional embodiment, Figure 3 and Figure 4 In the application update method shown, the client may also retain the current resource package; if loading of the updated application fails, the current version of the application corresponding to the current resource package is loaded.

[0104] For example, assuming that the client fails to load the updated application (for example, a theme page rendering error), the current version of the application corresponding to the current resource package may be loaded.

[0105] Optionally, the client can also output an alarm message if the updated application fails to load, indicating that the updated application failed to load. This helps operation and maintenance personnel to check and repair the updated application in a timely manner.

[0106] Optionally, the client can also record an exception log if the updated application fails to load. This will help subsequent operations and maintenance personnel accurately repair the updated application based on the exception log.

[0107] With this implementation, the client can load the current version of the application corresponding to the current resource package when the updated application fails to load. This is conducive to improving the normal operation of the application and thus improving the user experience.

[0108] In an optional embodiment, the client may also obtain current environment information when detecting a startup operation for an updated application; based on the current environment information and preset matching rules, load target content that matches the current environment information, and display the target content.

[0109] The current environment information may include but is not limited to the current geographical location, current power consumption, etc.

[0110] The preset matching rules may include but are not limited to priority matching rules, conditional matching rules, and data-driven matching rules.

[0111] For example, if the current environmental information is the current geographic location, the client can use a preset conditional matching rule to load a service portal that matches the current geographic location and display that service portal. For another example, if the current environmental information is the current power consumption, and the current power consumption is greater than a preset power consumption threshold (which can be understood as the current peak power consumption period), the client can use a preset priority matching rule to prioritize loading and displaying energy-saving themes that match the peak power consumption period.

[0112] With this implementation, the client can load target content that matches the current environment information based on the current environment information and preset matching rules, and display the target content, thereby improving the flexibility of the displayed target content.

[0113] In an optional embodiment, the client may also obtain the target object's historical access logs for the application; analyze the historical access logs, and determine pages whose access frequency is greater than a preset access frequency threshold based on the analysis results; preload static resources corresponding to the pages, and store the static resources locally; when it is detected that the target object starts an updated application, obtain the static resources from the local area, and generate a page based on the static resources.

[0114] The static resources corresponding to the preloaded page may include but are not limited to images, Cascading Style Sheets (CSS), and JavaScript (JS for short) corresponding to the preloaded page.

[0115] CSS is a language used to describe the presentation style of documents such as Hypertext Markup Language (HTML) or Extensible Markup Language (XML). CSS allows you to control the appearance and layout of web page elements, such as fonts, colors, margins, and sizes.

[0116] JS is a lightweight, interpreted, object-oriented, high-level programming language. It is primarily used to add interactivity and dynamic features to web pages, such as form validation, menu switching, and animation effects. It can run on both the client and the server.

[0117] Optionally, upon detecting that the target object has launched an application, the client retrieves static resources from the local server and generates a page based on the static resources. This can be achieved by retrieving static resources from the local server via a Content Delivery Network (CDN) and generating a page based on the static resources. This can improve page generation speed.

[0118] Using this implementation, the client preloads the static resources corresponding to the page and stores the static resources locally. When it detects that the target object has started an updated application, it obtains the static resources from the local computer and generates a page based on the static resources. This reduces page loading time, improves user experience, and improves user stickiness in accessing the application.

[0119] In an optional implementation, the client can also use lazy loading technology to load dynamic resources corresponding to the page. Lazy loading technology, also known as deferred loading technology, is an optimization technology that automatically retrieves more data as the user scrolls the page (or loads a resource only when it is needed, rather than loading all resources at the beginning), without affecting the display of existing data.

[0120] With this implementation, the client can load dynamic resources using lazy loading technology, which can reduce the initial loading pressure and thus reduce resource consumption on the server.

[0121] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0122] Based on the same inventive concept, embodiments of the present application also provide an application updating device for implementing the aforementioned application updating method. The implementation solution provided by this device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations of the embodiments of the application updating device provided below can be found in the aforementioned limitations of the application updating method and will not be further elaborated here.

[0123] See Figure 5 , Figure 5 This is a schematic diagram of the structure of an application updating device provided by an embodiment of the present application. Figure 5 As shown, the updating means of the application may include but are not limited to:

[0124] The acquisition module 501 is used to obtain the resource list of the application from the server; the resource list includes the latest version number of the application;

[0125] Download module 502 is used to download an incremental package from the server when it is determined that the latest version number is different from the current version number corresponding to the locally stored application; the incremental package is generated by the server based on the new resource package corresponding to the latest version number and the current resource package corresponding to the current version number;

[0126] The merging module 503 is used to merge the incremental package and the current resource package to obtain a merged resource package;

[0127] Determination module 504, used to determine the first hash value corresponding to the merged resource package and the second hash value corresponding to the new resource package; the second hash value is carried in the resource list;

[0128] The determining module 504 is further configured to, when it is determined that the first hash value is the same as the second hash value, use the application corresponding to the merged resource package as the updated application.

[0129] In one embodiment, the apparatus may further include a transceiver module. The transceiver module is configured to periodically send first information to the server, the first information including the third hash value corresponding to the current resource package; receive an incremental package address from the server, the incremental package address being sent to the client by the server upon determining that the third hash value is different from the second hash value corresponding to the new resource package; and a download module 502, configured to download the incremental package from the server using the incremental package address.

[0130] In one embodiment, when the acquisition module 501 is used to obtain the resource list of an application from the server, the transceiver module is specifically used to: when a startup operation for the application is detected, send a second message to the server, the second information is used to request to obtain the resource list corresponding to the application; receive the resource list from the server.

[0131] In one embodiment, the device may further include a storage module and a processing module. The storage module is used to store the current resource package; the processing module is used to load the current version of the application corresponding to the current resource package if the updated application fails to load.

[0132] In one embodiment, the acquisition module 501 is also used to obtain current environment information when a startup operation for an updated application is detected; the processing module is also used to load target content that matches the current environment information based on the current environment information and preset matching rules, and display the target content.

[0133] In one embodiment, the acquisition module 501 is also used to obtain the historical access log of the target object for the application; the processing module is also used to: analyze the historical access log, and determine the pages whose access frequency is greater than the preset access frequency threshold based on the analysis results; preload the static resources corresponding to the page, and store the static resources locally; when it is detected that the target object starts the updated application, obtain the static resources from the local, and generate a page based on the static resources.

[0134] Each module in the above-mentioned application update device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the terminal device in hardware form, or can be stored in the memory of the terminal device in software form, so that the processor can call and execute the corresponding operations of each module.

[0135] In an exemplary embodiment, the present application provides a computer device, which may be a terminal device, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals via wired or wireless means, and the wireless means can be implemented via Wi-Fi, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a method for updating an application program. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse.

[0136] Those skilled in the art will understand that Figure 6The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0137] In an exemplary embodiment, the present application provides a computer device including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned application program update method when executing the computer program.

[0138] In an exemplary embodiment, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above-mentioned application program update method when executed by a processor.

[0139] In an exemplary embodiment, the present application provides a computer program product, including a computer program, which implements the steps in the above-mentioned application program update method when executed by a processor.

[0140] It should be noted that the data involved in this application (including but not limited to resource lists, incremental packages, merged resource packages, first hash values, second hash values, updated applications, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0141] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.

[0142] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0143] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A method for updating an application, characterized in that: The method comprises: Obtaining a resource list of the application from the server; the resource list includes the latest version number of the application; If it is determined that the latest version number is different from the current version number corresponding to the locally stored application, downloading an incremental package from the server; the incremental package is generated by the server based on a new resource package corresponding to the latest version number and a current resource package corresponding to the current version number; Merging the incremental package and the current resource package to obtain a merged resource package; Determine a first hash value corresponding to the merged resource package and a second hash value corresponding to the new resource package; the second hash value is carried in the resource list; When it is determined that the first hash value is the same as the second hash value, the application corresponding to the merged resource package is used as the updated application.

2. The method according to claim 1, characterized in that The method further comprises: Periodically sending first information to the server, where the first information includes a third hash value corresponding to the current resource package; receiving an incremental package address from the server, where the incremental package address is sent to the client by the server when the server determines that the third hash value is different from the second hash value corresponding to the new resource package; Download the incremental package from the server via the incremental package address.

3. The method according to claim 1, characterized in that Obtaining the application's resource list from the server includes: When a startup operation for an application is detected, second information is sent to the server, where the second information is used to request a resource list corresponding to the application; Receive the resource list from the server.

4. The method according to claim 1, wherein The method further comprises: retaining the current resource bundle; In the case that the updated application fails to load, the current version of the application corresponding to the current resource package is loaded.

5. The method according to claim 1, characterized in that The method further comprises: When a startup operation for the updated application is detected, obtaining current environment information; Based on the current environment information and preset matching rules, target content matching the current environment information is loaded and displayed.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Obtaining historical access logs of the target object for the application; Analyzing the historical access logs and determining pages whose access frequency is greater than a preset access frequency threshold based on the analysis results; Preload the static resources corresponding to the page and store the static resources locally; When it is detected that the target object starts the updated application, the static resource is obtained locally, and the page is generated based on the static resource.

7. An application updating device, characterized in that: The device comprises: An acquisition module is used to obtain a resource list of an application from a server; the resource list includes the latest version number of the application; a download module configured to download an incremental package from the server when it is determined that the latest version number is different from the current version number corresponding to the locally stored application; the incremental package is generated by the server based on a new resource package corresponding to the latest version number and a current resource package corresponding to the current version number; A merging module, configured to merge the incremental package and the current resource package to obtain a merged resource package; a determination module, configured to determine a first hash value corresponding to the merged resource package and a second hash value corresponding to the new resource package; the second hash value being carried in the resource list; The determining module is further configured to, when it is determined that the first hash value is the same as the second hash value, use the application corresponding to the merged resource package as the updated application.

8. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 6 when executing the computer program.

9. A 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 method according to any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.