Application resource package processing method, device, equipment and readable storage medium

By detecting resource package crashes and performing downgrade repairs, parsing and loading H5 resource files, it solves the problem of being unable to provide services when the traditional hot update solution crashes, improving user experience and system stability.

CN111694582BActive Publication Date: 2024-10-22CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010348676.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-28
Publication Date
2024-10-22
Estimated Expiration
2040-04-28

AI Technical Summary

Technical Problem

The traditional hot update solution cannot provide services when the update package causes the application to crash, and cannot avoid the crash in advance, resulting in poor user experience and limited dynamics.

Method used

By detecting whether the resource package will cause a crash, if it crashes, perform downgrade repair, parse and load H5 resource files to achieve hot updates, and use the description information in the multi-terminal description file or Crash statistics to decide whether to perform downgrade repair.

Benefits of technology

Ensure the operational stability of terminal equipment, reduce human impact and development and operation and maintenance pressure, and achieve hot update capabilities in the event of a crash.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111694582B_ABST
    Figure CN111694582B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method, device, equipment and readable storage medium for processing an application resource package. The method for processing the application resource package includes: obtaining a resource package for hot update; if the resource package is detected and it is known that a crash will occur when hot update is performed according to the resource package, it is determined that downgrade repair is required; parsing and obtaining the H5 resource file in the resource package; loading the H5 resource file for hot update; wherein the resource package is a multi-terminal development resource package; the H5 resource file is used to implement the content or function of hot update in an H5 manner. By adopting the embodiment of the present invention, when it can be detected that downgrade repair is required, the content or function of hot update can be implemented by loading the H5 resource file, which can ensure the stability of terminal device operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of software technology, and in particular to a method, device, equipment and readable storage medium for processing an application resource package. Background Art

[0002] Terminal development technology is currently a popular front-end technology stack, and multi-terminal means developing a set of code that can run on multiple platforms (IOS, Android, H5) at the same time. The corresponding open source frameworks include React Native, Weex, etc.

[0003] Compared with traditional application development, this type of technology supports hot updates, that is, after the application is released, bug fixes and new features can be released through resource packages for hot updates. Specifically, hot updates are dynamic code releases, which allow developers to fix bugs and release features without releasing new versions, allowing developers to bypass the review mechanism of platforms such as Apple, avoiding long review waits and the costs caused by multiple rejections.

[0004] However, the code of the resource package issued for hot update may be dependent on the online client. At this time, the old version of the client cannot use the new resource package. For users who have not updated the client version, the new functions cannot be used. This is not user-friendly and also limits the dynamic nature of hot update. Traditional hot update solutions cannot provide services when the update package causes the application to crash, and cannot avoid application crashes in advance. Summary of the invention

[0005] The embodiments of the present invention provide a method, apparatus, device and readable storage medium for processing an application resource package.

[0006] In a first aspect, an embodiment of the present invention provides a method for processing an application resource package, which is applied to a terminal device, and the method includes:

[0007] Obtain a resource package for hot update; if the resource package is detected and it is found that a crash will occur when hot updating is performed according to the resource package, it is determined that downgrade repair is required; then parse and obtain the H5 resource file in the resource package; load the H5 resource file to perform hot update; wherein, the resource package is a multi-terminal development resource package; the H5 resource file is used to implement the content or function of hot update in H5 mode.

[0008] Based on the first aspect, in one optional implementation manner, the multi-terminal description file of the resource package includes description information; if the resource package is detected, it is learned that a crash will occur when hot updating is performed according to the resource package, and it is determined that downgrade repair is required; including:

[0009] When accessing the multi-terminal description file of the resource package, if it is detected that the description information of the multi-terminal description file contains information indicating H5 downgrade, it is determined that downgrade repair is to be performed.

[0010] Based on the first aspect, in one optional implementation manner, the multi-terminal description file of the resource package includes multiple description information corresponding to versions of multiple target devices; if it is detected that there is information indicating H5 downgrade in the description information of the multi-terminal description file, determining to perform downgrade repair includes:

[0011] When accessing the multi-terminal description file of the resource package, the description information corresponding to its own version is detected from the multiple description information corresponding to the versions of the multiple target devices, and it is obtained from the detected description information corresponding to its own version that the multi-terminal description file of the resource package contains information indicating H5 downgrade, and it is determined that downgrade repair is to be performed.

[0012] Based on the first aspect, in one optional implementation manner, if the resource package is detected and it is learned that a crash occurs when hot updating is performed according to the resource package, determining to perform downgrade repair includes:

[0013] If the resource package is detected, and during the hot update process according to the resource package, when the number of crashes reaches a threshold value triggering downgrade, it is determined that downgrade repair is to be performed.

[0014] Based on the first aspect, in one optional implementation manner, the method further includes:

[0015] If the resource package is detected and it is determined that no downgrade repair is required, a hot update is performed according to the resource package; during the hot update according to the resource package, when the number of crashes reaches a threshold that triggers downgrade, the steps of parsing to obtain the H5 resource file in the resource package and loading the H5 resource file are executed.

[0016] In a second aspect, an embodiment of the present invention provides a method for processing an application resource package, which is applied to a server, and the method includes:

[0017] Generate a resource package for hot update; the resource package includes an H5 resource file;

[0018] Sending the resource package to the terminal device;

[0019] Among them, the resource package is a multi-terminal development resource package; the H5 resource file is used to load the H5 resource file when the terminal device analyzes the resource package and detects that downgrade repair is required, so as to implement hot update content or functions in H5 mode.

[0020] Based on the second aspect, in one optional implementation manner, the terminal device includes a target device; the multi-terminal description file of the resource package includes a description information, and the description information includes information for indicating whether the target device performs H5 downgrade; sending the resource package to the terminal device includes:

[0021] The resource package is sent to the target device in a point-to-point manner.

[0022] Based on the second aspect, in one optional implementation manner, the terminal device includes multiple target devices; the multi-terminal description file of the resource package includes multiple description information corresponding to versions of the multiple target devices, and the description information includes information for indicating whether the target devices of the corresponding versions are downgraded to H5; sending the resource package to the terminal device includes:

[0023] The resource package is sent to the multiple target devices in a broadcast manner.

[0024] In a third aspect, an embodiment of the present invention provides a device for processing an application resource package, which is applied to a terminal device, and the device includes:

[0025] An acquisition unit, used for acquiring a resource package for hot update;

[0026] A detection and determination unit, configured to, if detecting the resource package, determine that a crash will occur when hot updating is performed according to the resource package, and determine that downgrade repair is to be performed;

[0027] A parsing unit, used for parsing and obtaining the H5 resource file in the resource package;

[0028] A loading unit, used to load the H5 resource file to perform downgrade repair;

[0029] Among them, the resource package is a multi-terminal development resource package; the H5 resource file is used to implement hot update content or functions in an H5 manner.

[0030] In a fourth aspect, an embodiment of the present invention provides a device for processing an application resource package, which is applied to a server, and the device includes:

[0031] A generating unit, used to generate a resource package for hot update; the resource package includes an H5 resource file;

[0032] A sending unit, used to send the resource package to a terminal;

[0033] Among them, the resource package is a multi-terminal development resource package; the H5 resource file is used to analyze the resource package on the terminal, and when it is detected that downgrade repair is required, the H5 resource file is loaded to implement hot update content or functions in H5 mode.

[0034] In a fifth aspect, an embodiment of the present invention provides an application resource package processing device, including a processor, wherein the processor is configured to call a stored program to execute the above-mentioned application resource package processing method.

[0035] In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, and when the program instructions are executed by a processor, the processor executes the above-mentioned method for processing an application resource package.

[0036] In the technical solution provided by the embodiment of the present invention, the terminal device can obtain the resource package sent by the server for hot update. When detecting the resource package, it can be learned that a crash will occur when hot updating is performed according to the resource package. Therefore, it is determined that downgrade repair is required, and the H5 resource file in the resource package is parsed and obtained, and the H5 resource file is loaded to perform downgrade repair. Through the embodiment of the present invention, information indicating H5 downgrade can be obtained from the description information contained in the multi-terminal description file of the resource package, or by monitoring the Crash statistics of the terminal device when using the resource package for hot update, it is detected that downgrade repair is required, which can reduce human influence and development and operation and maintenance pressure. When it is detected that downgrade repair is required, the content or function of hot update can be implemented by loading the H5 resource file, which can ensure the stability of terminal device operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.

[0038] Figure 1 It is a network architecture diagram of a method for processing an application resource package provided by an embodiment of the present invention;

[0039] Figure 2 is an interactive schematic diagram of a method for processing an application resource package provided by an embodiment of the present invention;

[0040] Figure 3 It is a flowchart of a method for processing an application resource package provided by an embodiment of the present invention;

[0041] Figure 4 is a flowchart of another method for processing an application resource package provided by an embodiment of the present invention;

[0042] Figure 5 is a flowchart of another method for processing an application resource package provided by an embodiment of the present invention;

[0043] Figure 6is a flowchart of another method for processing an application resource package provided by an embodiment of the present invention;

[0044] Figure 7 It is a structural schematic diagram of a device for processing an application resource package provided by an embodiment of the present invention;

[0045] Figure 8 is a structural schematic diagram of another device for processing application resource packages provided by an embodiment of the present invention;

[0046] Fig. 9 It is a structural diagram of a device for processing an application resource package provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The embodiments of the present invention are described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0048] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0049] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0050] The terms "component", "module", "system", etc. used in this specification are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program and / or a computer. By way of illustration, both applications running on a computing device and a computing device can be components. One or more components may reside in a process and / or an execution thread, and a component may be located on a computer and / or distributed between two or more computers. In addition, these components may be executed from various computer-readable media having various data structures stored thereon. Components may, for example, communicate through local and / or remote processes according to signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system and / or a network, such as the Internet interacting with other systems through signals).

[0051] See also Figure 1 , Figure 1 FIG. 1 is a network architecture diagram of a method for processing an application resource package provided by an embodiment of the present invention. Figure 1 The server 200 shown is used to provide background services for the terminal device 100 of the application installed in the terminal device. The server 200 can also be called the background server of the application. The server 200 may include but is not limited to a background server, a component server, a data server, etc. The server 200 can generate a resource package for hot update, which includes an H5 resource file. The H5 resource file is used to load the H5 resource file when the terminal device analyzes the resource package and detects that downgrade repair is required, so as to implement the content or function of hot update in the H5 manner. It should be noted that the server 200 can be a single server, a server cluster composed of multiple servers, or a cloud computing service center.

[0052] like Figure 1The client of the application can be installed on the terminal device 100 shown. The client refers to a program corresponding to the server that provides local services to customers. Here, local services may include but are not limited to: human-computer interaction services, local data collection and maintenance services, communication services between local and server, etc. Local services may include but are not limited to: sending information to the server and receiving information sent by the server and sharing information, etc. The terminal device 100 may include a mobile phone, a tablet computer, a laptop, a PDA, a mobile Internet device (mobile internet device, MID), and a wearable device (such as a smart watch, a smart bracelet, etc.). When the user opens the client of the application through the terminal device 100, the server 200 can detect that there is a BUG that needs to be repaired or a new function is launched on the target application software installed on the terminal device 100. The server 200 will send the constructed resource package to the terminal device 100, and the application software on the terminal device 100 can be hot-updated according to the resource package. If the application software on the terminal device 100 analyzes the received resource package and detects that it needs to be downgraded and repaired, it can parse and obtain the H5 resource file in the resource package, and load the H5 resource file to repair the BUG or launch a new function.

[0053] The client may include: locally running applications, functions running on a web browser (also known as WebApp), applets embedded in emails, applets embedded in instant messaging client software (such as WeChat), and functions embedded in other applications (such as WeChat) (such as WeChat public accounts), etc. For the client, the server 200 needs to run corresponding server-side programs to provide corresponding services, such as database services, data calculations, decision execution, etc. In the embodiment of the present invention, there is no limitation on the types of applications, such as game applications, multimedia applications, shopping applications, instant messaging applications, life service applications, social applications, payment applications, etc.

[0054] The terminal device 100 and the server 200 can directly communicate with each other through the network 300. The network 300 can be a wired network or a wireless network. The same terminal device can establish communication connections with servers of multiple different applications, and the server of the same application can also establish communication connections with multiple different terminal devices.

[0055] Understandably, Figure 1 The system architecture in is only an exemplary implementation in the embodiment of the present invention. The system architecture in the embodiment of the present invention includes but is not limited to the above system architecture.

[0056] See also Figure 2 , Figure 2 The following is an interactive diagram of a method for processing an application resource package provided by an embodiment of the present invention. The method includes but is not limited to the following steps:

[0057] S201, the server generates a resource package for hot update;

[0058] like Figure 1 The terminal device 100 shown can be installed with a client of an application program, where the client refers to a program corresponding to a server and providing local services to clients.

[0059] Specifically, the publisher of the client will update the configuration of the client according to the actual operation needs, such as the configuration update of the client's functions, processing logic, user interface, etc. Figure 1 When launching new functions or fixing bugs on the terminal device 100, the server (such as Figure 1 The configuration data is updated in the server 200 shown, and a resource package for hot update is constructed, and the above update includes but is not limited to at least one of the following: addition, deletion, and modification. Among them, hot update is that developers fix bugs and release functions without releasing a new version. The resource package for hot update contains H5 resource files. The H5 resource files are used to load the H5 resource files when the terminal device analyzes the resource package and detects that downgrade repair is to be performed, so as to implement the content or function of hot update in H5 mode. Among them, the multi-terminal description file of the resource package may contain a description information corresponding to the version of a target device, and may also contain multiple description information corresponding to the versions of multiple target devices, and the description information includes information for indicating whether the target device is to perform H5 downgrade. The resource package is a multi-terminal development resource package, which is developed based on open source frameworks such as ReactNative or Weex and can run on multiple platforms such as mobile operating systems (iOS) developed by Apple, free and open source operating systems (Android) based on Linux, and H5.

[0060] S202, the server sends the resource package to the terminal device;

[0061] Specifically, the server can establish a communication connection with the client. When the user starts the client installed on the terminal device 100, the server can send a resource package for hot update to the terminal device. If the multi-terminal description file of the resource package contains a description information corresponding to the version of the target device, the above resource package is sent to a target device corresponding to the version; if the multi-terminal description file of the resource package contains multiple description information corresponding to the versions of multiple target devices, the resource package is sent to the target devices of the corresponding versions. Correspondingly, the client installed on the terminal device 100 can obtain a resource package for hot update. Among them, the resource package includes an H5 resource file, and the H5 resource file is used to load the H5 resource file when the terminal device analyzes the resource package and detects that downgrade repair is required, so as to implement the content or function of hot update in H5 mode.

[0062] S203, if the terminal device detects the resource package and learns that a crash will occur when performing a hot update according to the resource package, it is determined that downgrade repair is required;

[0063] Specifically, during the process of detecting the received resource package, the terminal device may learn that a crash may occur when performing a hot update according to the resource package, so it may be determined that downgrade repair is required.

[0064] S204, the terminal device parses and obtains the H5 resource file in the resource package;

[0065] Specifically, if the configuration file of the resource package contains a description information, it can be determined based on the description information that downgrade repair is required, and the H5 resource file in the resource package is parsed to obtain; if the configuration file of the resource package contains multiple description information, the description information consistent with the client version installed on the terminal device can be parsed, and it can be determined based on the parsed description information that downgrade repair is required, and the H5 resource file in the resource package is parsed to obtain.

[0066] S205: The terminal device loads the H5 resource file to perform hot update.

[0067] Specifically, the terminal device can perform hot update by loading the H5 resource file, and finally present or implement the native content or function running in the client in the H5 manner. Among them, the H5 resource file can be stored in a resource package, or in a local server or a cloud server, and the embodiment of the present invention does not impose any restrictions.

[0068] See also Figure 3 , Figure 3 The following is a flow chart of a method for processing an application resource package provided by an embodiment of the present invention, which specifically describes how a server generates and sends a resource package. The method includes but is not limited to the following steps:

[0069] S301, calculating a unique identifier of the resource package according to the file content;

[0070] Specifically, when building a resource package, the server can calculate the unique identifier of the resource package based on the file content, and the unique identifier can be used to distinguish the multi-terminal description files of the resource package. Among them, the unique identifier can be an MD5 value calculated based on the file content. MD5 is the abbreviation of Message-Digest Algorithm, which is a widely used hash function that can generate a 128-bit hash value, mainly used to ensure the integrity and consistency of information transmission. MD5 processes the input information in 512-bit groups, and each group is divided into 16 32-bit sub-groups. After a series of processing, the algorithm outputs a 128-bit hash value composed of 32-bit groups. For example, for iOS, Android and H5 terminals, the MD5 values ​​calculated by their file contents are different. The MD5 value can be used as the unique identifier of each resource package, and the MD5 value can be used to correspond to each terminal description file in the resource package.

[0071] S302, formulating a path protocol for the resource package, wherein the path protocol is used to instruct the terminal device to access a description file;

[0072] Specifically, the resource package mentioned in the embodiment of the present invention can run on multiple platforms. The server needs to formulate a unified resource package path protocol for terminal devices of different platforms, so that after the terminal device receives the resource package, it can access the description files of each terminal through the unified resource package path protocol. For example, the path protocol format can be APP_Protocol: / / rUrl=<resource package path>&rParam=<routing parameters>. It should be noted that the embodiment of the present invention does not impose any restrictions on the path protocol format, and only needs to unify the access rules of the path. For the iOS terminal, the current path protocol address can be: APP_Protocol: / / rUrl=<https: / / XXX.com / xxx / ios.json> &rParam=<routing parameter>, the address of the parsed resource package is https: / / XXX.com / xxx / ios.json; for the Android terminal, the current path protocol address can be: APP_Protocol: / / rUrl=<https: / / XXX.com / xxx / android.json> &rParam=<routing parameter>, the address of the parsed resource package is https: / / XXX.com / xxx / android.json; for the H5 end, the current path protocol address can be: APP_Protocol: / / rUrl=<https: / / XXX.com / xxx / web.html> &rParam = <routing parameter>, the parsed resource package address is https: / / XXX.com / xxx / web.html. For terminal devices of various platforms, the description file can be accessed through the parsed resource package address.

[0073] Among them, the description files at each end accessed through the path protocol may contain description information or may contain description information corresponding to multiple versions. It is understandable that multiple versions are old versions that are to be hot-updated. The description information may be marked with whether there is information indicating H5 downgrade in the description file currently built, that is, the description information may be marked with information indicating H5 downgrade in the description file currently built, or there is no information indicating H5 downgrade in the description file currently built, or the description information is not included in the description file. It is understandable that the developer knows which versions of the application need to be downgraded and repaired for hot updates, and thus configures the description information in the resource package in the server, or the developer does not know which versions need to be downgraded and repaired, and does not configure the description information in a targeted manner.

[0074] For example, for a certain application, if the developer knows that clients that have installed application version 2.0.1, version 2.0.2, and version 2.0.4 need to be downgraded during the hot update process, the description information may be that the description files of clients that have installed application version 2.0.1, version 2.0.2, and version 2.0.4 respectively contain information indicating H5 downgrade; if the developer only knows that clients that have installed application version 2.3.4 do not need to be downgraded during the hot update process, the description information may be that the description file of clients that have installed application version 2.3.4 does not contain information indicating H5 downgrade; if the developer may not know which versions of the application need to be downgraded or not during the hot update process, then there is no description information.

[0075] S304: Send the resource package to the terminal device.

[0076] Specifically, the server may send a resource package configured for hot update to the client.

[0077] In one possible implementation, the terminal device includes a target device; the multi-terminal description file of the resource package includes a description information, and the description information includes information for indicating whether the target device performs H5 downgrade; sending the resource package to the terminal device includes:

[0078] The resource package is sent to the target device in a point-to-point manner.

[0079] Specifically, the target device is a terminal device that is consistent with the version of the description information, and a customized resource package can be sent to the target device. That is to say, the description file of the resource package can contain description information that is consistent with the client version installed and running in the target device, and the description information includes information for indicating whether the client currently installed and running on the terminal device is to perform H5 downgrade. For example, if the description information contained in the above resource package is information that the client version 2.4.1 needs to be downgraded during the hot update process, the server can send the resource package containing the description information to the terminal device with the client version 2.4.1 installed.

[0080] In one possible implementation, the terminal device includes multiple target devices; the multi-terminal description file of the resource package includes multiple description information corresponding to the versions of the multiple target devices, and the description information includes information for indicating whether the target device installed with the corresponding version is to perform H5 downgrade; sending the resource package to the terminal device includes:

[0081] The resource package is sent to the multiple target devices in a broadcast manner.

[0082] Specifically, the multi-terminal description file of the resource package may contain multiple description information, and the resource package containing multiple description information may be sent to multiple target devices in a broadcast manner. Among them, the multiple target devices are terminal devices that install and run the client versions corresponding to the above-mentioned multiple description information, and the description information includes information for indicating whether the target device with the corresponding version installed is to perform H5 downgrade. For example, the description information included in the multi-terminal description file can be information that client version 3.2.5, client version 3.2.7, and client version 4.3.9 need to be downgraded when performing hot updates, or information that client version 4.5.2 and client version 5.1.2 do not need to be downgraded when performing hot updates. It can be seen that the above multi-terminal description file contains description information of five versions, namely, version 3.2.5, version 3.2.7, version 4.3.9, version 4.5.2, and version 5.1.2. The resource package can be sent to the terminal device of client 3.2.5, the terminal device of client 3.2.7, the terminal design of client version 4.3.9, the terminal device of client 4.5.2, and the terminal device of client 5.1.2.

[0083] See also Figure 4 , Figure 4 : is a flow chart of another method provided by an embodiment of the present invention. The method includes but is not limited to the following steps:

[0084] S401, obtaining a resource package for hot update;

[0085] Specifically, after the server sends the configured resource package for hot update to the terminal device, the terminal device can obtain the resource package for hot update. The multi-terminal description file of the resource package obtained by the terminal device can contain one description information or multiple description information corresponding to the version of the target device.

[0086] S402, when accessing the multi-terminal description file of the resource package, if it is detected that there is information indicating H5 downgrade in the description information of the multi-terminal description file, it is determined to perform downgrade repair;

[0087] Specifically, after the terminal device receives the resource package sent by the server, it can parse the address of the resource package from the resource package path protocol, and access the multi-terminal description file of the resource package through the address of the resource package. If it is detected that the description information of the multi-terminal description file contains information indicating H5 downgrade, it is determined to perform downgrade repair. Among them, if the description file contains one description information, the terminal device can operate according to the above description information; or if the description file contains multiple description information, the terminal device needs to parse the description information corresponding to its own version from the multiple description information, and then perform the corresponding operation steps according to the parsed description information. It should be noted that the own version is the client version currently installed and running on the terminal device.

[0088] For example, when a terminal device that has installed and run client version 3.2.5 receives a resource package, the multi-terminal description file in the resource package that is accessed contains a description information. Then, the multi-terminal description file of client version 3.2.5 can be used to obtain information indicating H5 downgrade, and client version 3.2.5 needs to be downgraded and repaired. Or when a terminal device that has installed and run client version 3.3.5 receives a resource package, the multi-terminal description file in the resource package that is accessed contains 5 description information, and these 5 description information are client version 3.2.4, client 4.1.2, client 4.3.5, and the multi-terminal description file of client 3.3.5 contains information indicating H5 downgrade. The terminal device that has installed and run client version 3.3.5 can parse the description information of client version 3.3.5 from these 5 description information, and then perform corresponding operation steps according to the parsed description information.

[0089] S403, start WebView to load the H5 resource file to render the page.

[0090] Specifically, when the terminal device detects that it needs to perform a downgrade repair, it can parse and obtain the H5 resource file in the resource package. By starting WebView, the H5 resource file can be loaded to render the requested web page, and the native content or functions running in the client can be presented or implemented in the H5 way. Among them, WebView can load and display web pages, and it can be regarded as a browser for displaying the content after the network request.

[0091] See also Figure 5 , Figure 5 : is a flow chart of another method provided by an embodiment of the present invention. The method includes but is not limited to the following steps:

[0092] S501, obtaining a resource package for hot update;

[0093] Specifically, after the server sends the configured resource package for hot update to the terminal device, the terminal device can obtain the resource package for hot update.

[0094] S502, if the resource package is detected, during the hot update of the resource package, when the number of crashes reaches a threshold for triggering downgrade, determine to perform downgrade repair;

[0095] Specifically, if the terminal device detects the acquired resource package, multiple crashes occur during the hot update process according to the resource package, where the crash is caused by a downtime due to some reason, or the host or program stops working. When the number of crashes reaches the threshold that triggers downgrade, for example, the threshold may be 10 crashes per minute or 20 crashes per minute, in order to ensure the normal operation of the client, downgrade repair can be performed automatically. It should be noted that the downgrade threshold can be set according to the actual situation, and the embodiment of the present invention does not impose any restrictions.

[0096] S503, starting WebView to load the H5 resource file to render the page;

[0097] Specifically, detailed description can be found in SS403, which will not be repeated here.

[0098] S504: Send the version information of the client to be repaired by downgrading to the server.

[0099] Specifically, during the hot update process, the terminal device may actively downgrade because the number of crashes reaches the threshold for downgrade. This is because the developer did not expect or did not configure the description information in the multi-terminal description file in a targeted manner. Therefore, the terminal device can actively upload relevant information to the server, where the relevant information can be the version information of the client installed on the terminal device and the compatibility issues after downgrade repair, etc. These relevant information can help developers formulate a repair and compatibility plan for the subsequent new version hot update resource package.

[0100] See also Figure 6 , Figure 6 : is a flow chart of another method provided by an embodiment of the present invention. The method includes but is not limited to the following steps:

[0101] S601, obtaining a resource package for hot update;

[0102] Specifically, after the server sends the configured resource package for hot update to the terminal device, the terminal device can obtain the resource package for hot update.

[0103] S602, if the resource package is detected and it is determined that downgrade repair is not to be performed, hot update is performed according to the resource package;

[0104] Specifically, after the terminal device receives the resource package sent by the server, the address of the resource package can be parsed from the resource package path protocol, and the multi-terminal description file of the resource package can be accessed through the address of the resource package. From the description information contained in the multi-terminal description file of the resource package, it can be obtained that there is no information indicating H5 downgrade in the multi-terminal description file, and it is detected that no downgrade repair is performed, and hot update can be performed according to the resource package. It can be understood that because the multi-terminal description file of the resource package can contain one description information, it can also contain multiple description information corresponding to the versions of the multiple target devices. If the multi-terminal description file of the resource package obtained by the terminal device contains one description information, and the description information is that there is no information indicating H5 downgrade in the multi-terminal description file, it can be directly detected that no downgrade repair is performed; if the description file of the resource package obtained by the terminal device contains multiple description information, it is necessary to parse the description information consistent with the client version installed and running on the terminal device from the multiple description information, and the description information is that there is no information indicating H5 downgrade in the multi-terminal description file of the client version, then it can be detected that no downgrade repair is required. For example, when a terminal device with client version 5.1.2 obtains a resource package, if the multi-terminal description file of the resource package contains a description information, and the description information in the resource package accessed is that there is no H5 downgrade version in the multi-terminal description file, then the terminal with client version 5.1.2 does not need to downgrade when performing a hot update; or a terminal device with client version 6.1.3 obtains a resource package, if the multi-terminal description file of the resource package contains 4 description information, and the 4 description information in the resource package accessed are respectively that there is no information indicating H5 downgrade in the multi-terminal description file of client version 6.1.3 and there is information indicating H5 downgrade in the multi-terminal description files of clients 4.1.2, 4.3.5, and 3.3.5. The terminal device with client version 6.1.3 needs to parse out the description information of client 6.1.3, and the parsed description information is that there is no information indicating H5 downgrade in the multi-terminal description file of client 6.1.3, then the terminal with client 6.1.3 does not need to downgrade when performing a hot update.

[0105] S603, if the resource package is detected, during the hot update of the resource package, when the number of crashes reaches a threshold for triggering downgrade, determine to perform downgrade repair;

[0106] Specifically, detailed description can be found in S502, which will not be repeated here.

[0107] S604, executing the step of parsing to obtain the H5 resource file in the resource package and loading the H5 resource file;

[0108] Specifically, detailed description can be found in S403, which will not be repeated here.

[0109] S605: Send the version information of the client to be repaired by downgrading to the server.

[0110] Specifically, the detailed description can be found in S504, which will not be repeated here.

[0111] See also Figure 7 , Figure 7 is a schematic diagram of a structure of a processing device for an application resource package provided by an embodiment of the present invention. The processing device 70 for an application resource package may include: an acquisition unit 701, a detection and analysis unit 702, a parsing unit 703 and a loading unit 704, wherein:

[0112] An acquisition unit 701 is used to acquire a resource package for hot update;

[0113] A detection and determination unit 702 is configured to, if detecting the resource package, determine that a crash will occur when hot updating is performed according to the resource package, and determine that downgrade repair is to be performed;

[0114] A parsing unit 703 is used to parse and obtain the H5 resource file in the resource package;

[0115] A loading unit 704 is used to load the H5 resource file to perform downgrade repair;

[0116] Among them, the resource package is a multi-terminal development resource package; the H5 resource file is used to implement hot update content or functions in an H5 manner.

[0117] In a possible implementation, the multi-terminal description file of the resource package contains description information; when the detection and determination unit 702 is specifically used to access the multi-terminal description file of the resource package, if it is detected that the description information of the multi-terminal description file contains information indicating H5 downgrade, it is determined that downgrade repair is to be performed.

[0118] In one possible implementation, the multi-terminal description file of the resource package contains multiple description information corresponding to versions of multiple target devices; the detection and parsing unit 702 is specifically used to parse the description information corresponding to its own version from the multiple description information corresponding to the versions of multiple target devices when accessing the multi-terminal description file of the resource package, and obtain information indicating H5 downgrade in the multi-terminal description file of the resource package from the detected description information corresponding to its own version, and determine that downgrade repair is to be performed.

[0119] In a possible implementation, the detection and analysis unit 702 is specifically configured to, if the resource package is detected, determine to perform downgrade repair when the number of crashes reaches a threshold for triggering downgrade during a hot update of the resource package.

[0120] The processing device 70 of the application resource package is also specifically used to perform hot update according to the resource package if the resource package is detected and it is determined that no downgrade repair is required; in the process of hot updating according to the resource package, when the number of crashes reaches the threshold that triggers downgrade, execute the steps of parsing to obtain the H5 resource file in the resource package and loading the H5 resource file.

[0121] It should be noted that the implementation of each unit may also correspond to the corresponding description of the embodiment of the method for processing a program resource package, which will not be repeated here.

[0122] See also Figure 8 , Figure 8 80 is a schematic diagram of the structure of another application resource package processing device provided by an embodiment of the present invention. The application resource package processing device 80 may include:

[0123] A generating unit 801 is used to generate a resource package for hot update; the resource package includes an H5 resource file;

[0124] A sending unit 802, configured to send the resource package to a terminal;

[0125] Among them, the resource package is a multi-terminal development resource package; the H5 resource file is used to analyze the resource package on the terminal, and when it is detected that downgrade repair is required, the H5 resource file is loaded to implement hot update content or functions in H5 mode.

[0126] In one possible implementation, the terminal device includes a target device; the multi-terminal description file of the resource package includes a description information, and the description information includes information for indicating whether the target device performs H5 downgrade; the sending unit 802 is specifically used to send the resource package to the target device in a point-to-point manner.

[0127] In one possible implementation, the terminal device includes multiple target devices; the multi-terminal description file of the resource package contains multiple description information corresponding to the versions of the multiple target devices, and the description information includes information for indicating whether the target devices of the corresponding versions are downgraded to H5; the sending unit 802 is specifically used to send the resource package to the multiple target devices in a broadcast manner.

[0128] It should be noted that the implementation of each unit may also correspond to the corresponding description of the embodiment of the method for processing a program resource package, which will not be repeated here.

[0129] See also Fig. 9 , Fig. 9 FIG. 1 is a schematic diagram of a structure of a processing device for an application resource package provided by an embodiment of the present invention. Fig. 9 As shown, the processing device 90 of the application resource package may include: one or more processors 901, one or more memories 902 and one or more communication interfaces 903. These components may be connected via a bus 904 or other means. Fig. 9 Take bus connection as an example.

[0130] The communication interface 903 may be used for the electronic device 900 to communicate with other communication devices, such as other electronic devices. Specifically, the communication interface 903 may be a wired interface.

[0131] The memory 902 can be coupled to the processor 901 through the bus 904 or the input and output ports, and the memory 902 can also be integrated with the processor 901. The memory 902 is used to store various software programs and / or multiple sets of instructions or data. Specifically, the memory 902 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 902 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices or other non-volatile solid-state storage devices. The memory 902 may store an operating system (hereinafter referred to as system), such as an embedded operating system such as uCOS, VxWorks, RTLinux, etc. The memory 902 may also store a network communication program, which may be used to communicate with one or more additional devices, one or more user devices, or one or more electronic devices. The memory may be independent and connected to the processor via a bus. The memory may also be integrated with the processor.

[0132] The memory 902 is used to store application code for executing the above solution, and the execution is controlled by the processor 901. The processor 901 is used to execute the application code stored in the memory 902.

[0133] The processor 901 may be a central processing unit, a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements a certain function, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like.

[0134] The processor 901 may be used to call the application stored in the memory 902 to implement the corresponding steps of the method for processing the application resource package in the corresponding embodiment; in a specific implementation, one or more instructions in the computer storage medium are loaded by the processor 901 and execute the following steps:

[0135] The processor 901 obtains a resource package for hot update through the communication interface 903;

[0136] If the processor 901 detects the resource package and learns that a crash will occur when performing a hot update according to the resource package, it determines that downgrade repair is required;

[0137] The processor 901 parses and obtains the H5 resource file in the resource package;

[0138] The processor 901 loads the H5 resource file to perform downgrade repair;

[0139] Among them, the resource package is a multi-terminal development resource package; the H5 resource file is used to implement hot update content or functions in an H5 manner.

[0140] In another embodiment, the multi-terminal description file of the resource package contains description information; when the processor 901 accesses the multi-terminal description file of the resource package, if it is detected that the description information of the multi-terminal description file contains information indicating H5 downgrade, it is determined that downgrade repair is to be performed.

[0141] In another embodiment, the multi-terminal description file of the resource package includes multiple description information corresponding to versions of multiple target devices; when the processor 901 accesses the multi-terminal description file of the resource package, it detects the description information corresponding to its own version from the multiple description information corresponding to the versions of the multiple target devices, and obtains from the detected description information corresponding to its own version that the multi-terminal description file of the resource package contains information indicating H5 downgrade, and determines that downgrade repair is to be performed.

[0142] In another implementation manner, if the processor 901 detects the resource package and, during a hot update of the resource package, when the number of crashes reaches a threshold for triggering downgrade, it is determined to perform downgrade repair.

[0143] In another embodiment, if the processor 901 detects the resource package and determines that no downgrade repair is performed, a hot update is performed according to the resource package; during the hot update according to the resource package, when the number of crashes reaches a threshold that triggers downgrade, the parsing is performed to obtain the H5 resource file in the resource package, and the step of loading the H5 resource file is performed.

[0144] The processor 901 is used to generate a resource package for hot update; the resource package includes an H5 resource file;

[0145] The processor 901 sends the resource package to the terminal device through the communication interface 903;

[0146] Among them, the resource package is a multi-terminal development resource package; the H5 resource file is used to load the H5 resource file when the terminal device analyzes the resource package and detects that downgrade repair is required, so as to implement hot update content or functions in H5 mode.

[0147] In another implementation, the processor 901 calculates the unique identifier of the resource package according to the file content;

[0148] In another implementation, the path protocol of the resource package is formulated by the processor 901;

[0149] In another embodiment, the terminal device includes a target device; the multi-terminal description file of the resource package includes a description information, and the description information includes information for indicating whether the target device performs H5 downgrade; the processor 901 sends the resource package to the target device in a point-to-point manner through the communication interface 903.

[0150] In another embodiment, the terminal device includes multiple target devices; the multi-terminal description file of the resource package contains multiple description information corresponding to the versions of the multiple target devices, and the description information includes information for indicating whether the target devices of the corresponding versions are downgraded to H5; the processor 901 sends the resource package to the multiple target devices in a broadcast manner through the communication interface 903.

[0151] It should be noted that Fig. 9 The processing 90 of the application resource package shown is only one implementation of the embodiment of the present invention. In actual applications, the processing 90 of the application resource package may also include more or fewer components, which is not limited here.

[0152] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0153] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0154] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0155] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0156] In addition, each functional unit in each embodiment of the present application 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.

[0157] If the above-mentioned 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 application 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. Among them, the aforementioned storage medium may include: U disk, mobile hard disk, magnetic disk, optical disk, read-only memory (Read-Only Memory, abbreviated: ROM) or random access memory (Random Access Memory, abbreviated: RAM) and other media that can store program codes.

[0158] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

Claims

1. A method for processing an application resource package, characterized in that: The method comprises: The server generates a resource package for hot update; the resource package includes an H5 resource file, and the resource package can be run on multiple platforms; The server formulates a unified resource package path protocol for terminal devices of different platforms. The unified resource package path protocol is used for the terminal device to access each end description file in the multi-end description file of the resource package through the unified resource package path protocol after receiving the resource package. The multi-end description file includes one or more description information, and the one or more description information respectively corresponds to different versions. The description information includes information for indicating whether the client installed with the corresponding version performs H5 downgrade; If the multi-terminal description file contains a description information, the server sends the resource package to the terminal device in a point-to-point manner, and the client version installed on the terminal device is consistent with the version corresponding to the description information in the multi-terminal description file; or The multi-terminal description file includes multiple description information, the server sends the resource package to multiple terminal devices in a broadcasting manner, and the client version installed on each of the multiple terminal devices is consistent with the version corresponding to one of the multiple description information; The terminal device obtains the resource package for hot update; The terminal device parses the address of the resource package from the path protocol of the resource package, and accesses the multi-terminal description file of the resource package through the address of the resource package; If the multi-terminal description file includes one description information, and the terminal device determines that the one description information contains information indicating H5 downgrade, it is determined to perform downgrade repair; If the multi-terminal description file contains multiple description information, the terminal device parses the description information corresponding to its own version from the multiple description information, and if the parsed description information contains information indicating H5 downgrade, it is determined to perform downgrade repair; When the terminal device determines that downgrade repair is to be performed, the terminal device parses and obtains the H5 resource file in the resource package; The terminal device loads the H5 resource file to perform hot update; Among them, the resource package is a multi-terminal development resource package; the H5 resource file is used to implement hot update content or functions in an H5 manner.

2. The method according to claim 1, characterized in that The method further comprises: If the resource package is detected and it is determined that downgrade repair is not to be performed, hot update is performed according to the resource package; In the process of hot updating according to the resource package, when the number of crashes reaches a threshold that triggers downgrade, the steps of parsing to obtain the H5 resource file in the resource package and loading the H5 resource file are executed.

3. The method according to claim 1 or 2, further comprising: The server calculates a unique identifier of the resource package according to the file content of the resource package.

4. A system for processing an application resource package, the system comprising a terminal device and a network device, A server is used to generate a resource package for hot update; the resource package includes an H5 resource file, and the resource package can run on multiple platforms; The server is used to formulate a unified resource package path protocol for terminal devices of different platforms. The unified resource package path protocol is used for the terminal device to access each end description file in the multi-end description file of the resource package through the unified resource package path protocol after receiving the resource package. The multi-end description file includes one or more description information, and the one or more description information respectively corresponds to different versions. The description information includes information for indicating whether the client installed with the corresponding version performs H5 downgrade; The server is used to send the resource package to the terminal device in a point-to-point manner if the multi-terminal description file contains a description information, and the client version installed in the terminal device is consistent with the version corresponding to the description information in the multi-terminal description file; or The server is configured to send the resource package to multiple terminal devices in a broadcasting manner if the multi-terminal description file contains multiple description information, and the client version installed in each of the multiple terminal devices is consistent with the version corresponding to one of the multiple description information; The terminal device is used to obtain the resource package for hot update; The terminal device is used to parse the address of the resource package from the path protocol of the resource package, and access the multi-terminal description file of the resource package through the address of the resource package; The terminal device is configured to determine that downgrade repair is to be performed if the multi-terminal description file includes one description information and it is determined that the one description information contains information indicating that H5 downgrade is to be performed; The terminal device is configured to parse the description information corresponding to the own version from the multiple description information if the multi-terminal description file contains multiple description information, and determine to perform downgrade repair if the parsed description information contains information indicating H5 downgrade; The terminal device is used to parse and obtain the H5 resource file in the resource package when the terminal device determines that downgrade repair is to be performed; The terminal device is used to load the H5 resource file for hot update; Among them, the resource package is a multi-terminal development resource package; the H5 resource file is used to implement hot update content or functions in an H5 manner.

5. A device for processing an application resource package, characterized in that: The method comprises a processor, wherein the processor is configured to call a stored program to execute the method according to any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 3.