WO2019019643A1 - 应用程序热更新方法、装置、终端和存储介质 - Google Patents
应用程序热更新方法、装置、终端和存储介质 Download PDFInfo
- Publication number
- WO2019019643A1 WO2019019643A1 PCT/CN2018/078315 CN2018078315W WO2019019643A1 WO 2019019643 A1 WO2019019643 A1 WO 2019019643A1 CN 2018078315 W CN2018078315 W CN 2018078315W WO 2019019643 A1 WO2019019643 A1 WO 2019019643A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- file
- new version
- update
- resource file
- version
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/656—Updates while running
Definitions
- the present application relates to the field of computer technologies, and in particular, to an application hot update method, apparatus, terminal, and storage medium.
- React Native an open source framework for developing applications based on the JavaScript framework
- hot updates allow code and resources to be updated without the need for the application to be reinstalled.
- the working mechanism is to package a series of resources into a bundle file (a resource file package), and the application loads the bundle file to complete the hot update.
- React Native hot update will package all js files into a bundle file and publish the entire bundle file. If the bundle file fails to load, it may cause the entire application to crash. How to effectively avoid the crash of the entire application during the React Native hot update is a technical problem that needs to be solved.
- An application hot update method including:
- the application is started, and the mapping file and the plurality of current version resource file packages are loaded; the business function identifier and the corresponding resource file package identifier are recorded in the mapping file;
- An application hot update device comprising:
- a startup module configured to start an application, load a mapping file, and multiple current version resource file packages;
- the mapping function file records a service function identifier and a corresponding resource file package identifier;
- a communication module configured to generate a version update request, send the version update request to the server, so that the server queries whether the update file corresponding to the new version exists according to the version update request, and if yes, acquires the update file;
- a dynamic loading module configured to dynamically load, by using the mapping file, a new version resource file package corresponding to the service function identifier
- the rollback module is configured to roll back the current version resource file package if it detects that the new version resource file package fails to load.
- a terminal includes a memory and a processor, wherein the memory stores computer readable instructions, and when the instructions are executed by the processor, the following steps are implemented:
- mapping function file records a service function identifier and a corresponding resource file package identifier
- One or more computer readable non-volatile storage media storing computer readable instructions, when executed by one or more processors, cause one or more processors to perform the steps of:
- mapping function file records a service function identifier and a corresponding resource file package identifier
- the above application hot update method, device, terminal and storage medium can obtain an update file through a version update request when the application performs a React Native hot update, thereby effectively preventing the application from crashing during the React Native hot update.
- FIG. 1 is an application scenario diagram of an application hot update method in an embodiment
- Figure 2 is a block diagram of the terminal of Figure 1;
- FIG. 3 is a flow chart of an application hot update method in an embodiment
- FIG. 4 is a block diagram of an application hot update apparatus in one embodiment.
- first may be referred to as a second client
- second client may be referred to as a first client, without departing from the scope of the present application.
- Both the first client and the second client are clients, but they are not the same client.
- the application hot update method provided in the embodiment of the present application can be applied to the application scenario as shown in FIG. 1.
- the terminal 102 is connected to the server 104 via a network.
- the terminal 102 has an application installed.
- the application starts, the base file package, the mapping file, and multiple current version resource file packages are loaded.
- the application When the application is launched, the application generates a version update request to send a version update request to the server 104 over the network.
- the server 104 receives the version update request, and queries whether the update text corresponding to the new version exists according to the application identifier and the current version number carried in the version update request. If so, the server 104 acquires the update file corresponding to the new version, and returns the update file to the terminal 102.
- the terminal 102 receives the new version of the update file by using the application, and dynamically loads the new version resource file package corresponding to the service function identifier by using the mapping file.
- the terminal 102 loads the new version resource file package by using the application, if a load failure occurs, the new version resource file package is rolled back to the current version resource file package. This effectively prevents the application from crashing and ensures that the application continues to function properly.
- the terminal includes a processor coupled through a system bus, a non-volatile storage medium, an internal memory and network interface, a display screen, and an input device.
- the processor of the terminal is used to provide calculation and control capabilities.
- the memory of the terminal includes a non-volatile storage medium and an internal memory.
- the non-volatile storage medium of the terminal stores an operating system and computer readable instructions, the internal memory of the terminal providing an environment for operating the operating system and computer readable instructions in the non-volatile storage medium.
- the computer readable instructions are executed by the processor to implement an application hot update method.
- the network interface is used for network communication with the server, such as sending a version update request and receiving an update file returned by the server.
- the display screen of the terminal may be a liquid crystal display or an electronic ink display screen, and the input device may be a touch layer covered on the display screen, or may be a button, a trackball or a touchpad provided on the terminal housing.
- the terminal can be a mobile phone, a tablet or a personal digital assistant or a wearable device. It will be understood by those skilled in the art that the structure shown in FIG. 2 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 terminal to which the solution of the present application is applied.
- the specific terminal may include a ratio. More or fewer components are shown in the figures, or some components are combined, or have different component arrangements.
- an application hot update method is provided, which is applied to the terminal as an example, and specifically includes the following steps:
- Step 302 Start an application, load a mapping file, and multiple current version resource file packages; the mapping function records the service function identifier and the corresponding resource file package identifier.
- Step 304 Generate a version update request, and send a version update request to the server, so that the server queries whether the update file corresponding to the new version exists according to the version update request, and if yes, obtains the update file.
- Step 306 Receive an update file returned by the server, where the update file includes multiple new version resource file packages, and the new version resource file package has a resource file package identifier.
- Step 308 Dynamically load a new version resource file package corresponding to the service function identifier by using the mapping file.
- Step 310 If it is detected that the new version resource file package fails to be loaded, roll back to the current version resource file package.
- the terminal has an application installed.
- the base file package, the mapping file, and multiple current version resource file packages are loaded.
- the base package covers the basic functionality of the application and the public library.
- the resource file package can be obtained by subcontracting processing according to the business function.
- Applications can have multiple business functions, such as insurance, financial management, and illegal queries. Different business functions can have different resource file packages.
- the mapping between the service function identifier and the resource file package identifier is recorded in the mapping file. Different versions of resource files can be identified by the same file.
- Applications can have multiple versions. After the application is started, the application acquires the application identifier, the current version number, the terminal information, and the like, and generates a version update request by using the application identifier, the current version number, and the terminal information, and sends the version update request to the server.
- the server receives the version update request, and queries whether the update text corresponding to the new version exists according to the application identifier and the current version number carried in the version update request. If yes, the server obtains an update file corresponding to the new version, and returns the update file to the terminal.
- the terminal utilizes the application to receive a new version of the update file.
- the update file can be a compressed file.
- the terminal uses the application to decompress the update file to obtain multiple and new version resource file packages.
- the application dynamically loads the new version resource file package corresponding to the business function identifier by using the mapping file.
- the step of dynamically loading a new version resource file package corresponding to the service function identifier by using the mapping file includes: obtaining a dynamic reference method corresponding to the service function; acquiring a dependency relationship between the multiple service functions; and utilizing the dynamic reference The method and the dependency query the resource file package identifier that needs to be loaded in the mapping file; obtain the new version resource file package according to the queried resource file package identifier, and dynamically load the new version resource file package.
- the resource file package can be located in the assets directory.
- the new version resource file package after the packet processing may be replaced with other specified directories, and all new version resource file packages in the specified directory may be flat. Level storage.
- Each business function can have a corresponding program module, and the corresponding business function is realized by running the program module.
- the developer can modify the reference method between the program modules corresponding to the multiple business functions during the application development process.
- the reference method between program modules uses a static reference method. Failure to statically load a resource file package can affect multiple program modules and can even cause an application to crash.
- the reference method between program modules is modified to a dynamic reference method.
- the application acquires a dynamic reference method between program modules of multiple business functions, and a dependency relationship between program modules of multiple business functions.
- the application uses the dynamic reference method and dependencies to query the mapping file for the resource file package identifier to be loaded.
- the application obtains the resource file package acquisition interface, and the interface can obtain the new version resource file package in the specified directory according to the queried resource file package identifier.
- This enables multiple new version resource file packages to be dynamically loaded one by one.
- the terminal can back up through the application's current version resource package.
- the backup resource file package is obtained, and the new version resource file package is rolled back to the current version resource file package by using the backed up resource file package. Make sure the application continues to function normally.
- the update file can be obtained through the version update request.
- the new version resource file package is dynamically loaded by using the mapping relationship between the service function identifier and the resource file package identifier in the mapping file. If a new version of the resource file package fails to load, it can effectively avoid the impact on the program modules of other business functions, thus effectively avoiding the application crash. If a new version of the resource file package fails to load, roll back to the current version resource file package to ensure that the application continues to function normally. This makes it possible to effectively avoid application crashes during React Native hot updates.
- the new version resource file package can be the patch file of the current version resource file package.
- the patch file is dynamically loaded by using the mapping file.
- the hotfix of the application is implemented by merging the loaded patch file with the current version resource file package. Due to the small patch file, it can effectively improve the file transfer speed and speed up the hot update efficiency.
- mapping file update includes full update and incremental update.
- the application receives the update file returned by the server, extracts the full-updated mapping file in the update file, loads the fully updated mapping file, and overwrites the local mapping file.
- the new version of the resource file package is then dynamically loaded using the fully updated mapping file.
- the mapping file is an incremental update
- the application receives the update file returned by the server, extracts the incremental update mapping file in the update file, and loads the incrementally updated mapping file.
- the incrementally updated mapping file is merged with the local mapping file to obtain the updated mapping file.
- the new version resource file package is dynamically loaded using the updated mapping file. This makes it easy to quickly implement hot updates for your application.
- the update file includes a new version of the image
- the method further includes: when the application is started, loading a local transparent picture; when receiving the update file, acquiring an image update path corresponding to the application in the update file According to the image update path, the new version image is updated in the update file; if it exists, the new version image is obtained, and the new version image is used to overwrite the transparent image for image update.
- the server obtains the corresponding updated picture according to the request.
- the version update request carries terminal information including a terminal model, a screen size, and a screen resolution.
- the server obtains the corresponding new version image according to the terminal information, and writes the new version image to the update file.
- the terminal receives the update file returned by the server.
- the new version image needs to be loaded.
- the application When the application starts, it loads the local default transparent image in addition to the base file package, the mapping file, and multiple current version resource file packages.
- a transparent picture When a transparent picture is loaded, the display effect is that there is currently no content to display.
- the transparent picture can have a corresponding size, such as 16 x 16 or the like.
- the terminal After the terminal receives the update file returned by the server, the terminal acquires the image update path in the update file through the application.
- the application queries the update file according to the image update path to check whether there is a new version of the image. If it exists, the new version image is acquired, and the new version image is loaded to cover the transparent image to implement the image update. If the new version image is not found in the update file according to the update path, the local default image path is obtained, and the current version image is locally queried according to the default image path, and the current version image is loaded to cover the transparent image. If the current picture is not queried locally, the transparent picture continues to be displayed.
- the update file since the update file only includes the update picture corresponding to the terminal information, it is not required to send all the pictures to the application, which effectively reduces the size of the update file, not only improves the transmission speed of the update file, but also effectively improves The application update efficiency.
- the method further includes: if the application crashes, identifying a crashed service function, obtaining a corresponding service function identifier; and querying, according to the service function identifier, a corresponding resource file package identifier in the mapping file; The resource file package identifies the fault location where the crash occurred.
- the terminal may use React Native to identify the crashed business function and obtain the business function.
- the service function identifier may also be referred to as a crash service function identifier.
- the terminal uses the React Native call mapping file to query the corresponding resource file package identifier in the mapping file according to the crash service function identifier.
- the resource file package in which the crash occurred is identified based on the queried resource file package identifier. This makes it possible to quickly and accurately locate the location where the crash occurred, making it easier for developers to fix the application.
- the current version resource file includes a current version of the bundle file
- the new version of the resource file includes a patch file corresponding to the new version of the bundle file
- the method further includes: extracting, in the update file, a first check code corresponding to the new version of the bundle file; merging the patch file with the current version of the bundle file to obtain a merged new version of the bundle file; and calculating a corresponding new version of the bundle file corresponding to the bundled file
- the second check code is compared with the second check code. If the difference is different, the patch file fails to be loaded, and the merged new version of the bundle file is rolled back to the current version of the bundle file.
- the React Native hot update may be an incremental hot update.
- the new version resource package in the update file may be the patch file corresponding to the new version bundle file.
- the update file also includes the first check code corresponding to the new version of the bundle file.
- the first check code may be an MD5 (Message-Digest Algorithm 5) value.
- the patch file corresponding to the new version of the bundle file is dynamically loaded through the mapping file. After the patch file is loaded, it is merged with the corresponding current version of the bundle file to generate a merged new version of the bundle file.
- the terminal can use React Native to calculate the second check code of the merged new version of the bundle file.
- the second check code is also an MD5 value.
- the first check code is compared with the second check code. If the two are the same, the patch file is successfully loaded. If the two are different, the patch file fails to load.
- the present application further provides an application hot update device
- the internal structure of the application hot update device may correspond to the structure shown in FIG. 2, and each of the following modules may pass through the software in whole or in part. , hardware or a combination thereof.
- the application hot update device includes a boot module 402, a communication module 404, a dynamic load module 406, and a rollback module 408, wherein:
- the startup module 402 is configured to start an application, load a mapping file, and multiple current version resource file packages; the mapping function records the service function identifier and the corresponding resource file package identifier.
- the communication module 404 is configured to generate a version update request, and send a version update request to the server, so that the server queries whether the update file corresponding to the new version exists according to the version update request, and if yes, obtains the update file; and receives the update file returned by the server.
- the update file includes multiple new version resource file packages, and the new version resource file package has a resource file package identifier.
- the dynamic loading module 406 is configured to dynamically load a new version resource file package corresponding to the service function identifier by using the mapping file.
- the rollback module 408 is configured to roll back the current version resource file package if it detects that the new version resource file package fails to load.
- the update file includes a new version of the image
- the startup module 402 is further configured to load a local transparent image when the application is started.
- the dynamic loading module 406 is further configured to: when the update file is received, acquire the application in the update file.
- the image update path corresponding to the program ; whether the new version image exists in the update file according to the image update path; if it exists, the new version image is obtained, and the new version image is used to overwrite the transparent image for image update.
- the dynamic loading module 406 is further configured to obtain a dynamic reference method corresponding to the service function, obtain a dependency relationship between the multiple service functions, and query the resource file to be loaded in the mapping file by using the dynamic reference method and the dependency relationship.
- the package identifier is obtained.
- the new version resource file package is obtained according to the queried resource file package identifier, and the new version resource file package is dynamically loaded.
- the device further includes: a positioning module 410, configured to: if the application crashes, identify a crashed service function, obtain a corresponding service function identifier; and query the corresponding resource file in the mapping file according to the service function identifier.
- the package identifier locates the fault location where the crash occurs according to the queried resource file package identifier.
- the current version resource file includes a current version of the bundle file
- the new version of the resource file includes a patch file corresponding to the new version of the bundle file.
- the device further includes a verification module 412, configured to extract a new version of the bundle file in the update file.
- the first check code; the patch file is merged with the current version of the bundle file to obtain a merged new version of the bundle file; the second check code corresponding to the merged new version of the bundle file is calculated; the first check code and The second check code is compared. If the difference is different, the patch file fails to be loaded.
- the rollback module is also used to roll back the merged new version of the bundle file to the current version of the bundle file.
- a terminal includes a memory and a processor.
- the memory stores computer readable instructions.
- the processor executes the following steps:
- mapping function file records the business function identifier and the corresponding resource file package identifier
- the update file includes a plurality of new version resource file packages, and the new version resource file package has a resource file package identifier;
- the update file includes a new version of the picture
- the processor performs the following steps when executing the computer readable instructions:
- the processor also performs the following steps when executing the computer readable instructions:
- the new version resource file package is obtained according to the queried resource file package identifier, and the new version resource file package is dynamically loaded.
- the processor also performs the following steps when executing the computer readable instructions:
- the fault location of the crash is located according to the queried resource file package identifier.
- the current version resource file includes a current version of the bundle file
- the new version of the resource file includes a patch file corresponding to the new version of the bundle file
- the patch file is merged with the current version of the bundle file to obtain a merged new version of the bundle file;
- the first check code is compared with the second check code. If the difference is different, the patch file fails to be loaded, and the merged new version of the bundle file is rolled back to the current version of the bundle file.
- one or more computer readable non-volatile storage media having computer readable instructions, when executed by one or more processors, causing one or more processors Perform the following steps:
- mapping function file records the business function identifier and the corresponding resource file package identifier
- the update file includes a plurality of new version resource file packages, and the new version resource file package has a resource file package identifier;
- the update file includes a new version of the picture
- the computer readable instructions when executed by the processor, also perform the following steps:
- the computer readable instructions when executed by the processor, also perform the following steps:
- the new version resource file package is obtained according to the queried resource file package identifier, and the new version resource file package is dynamically loaded.
- the computer readable instructions when executed by the processor, also perform the following steps:
- the fault location of the crash is located according to the queried resource file package identifier.
- the current version resource file includes a current version of the bundle file
- the new version of the resource file includes a patch file corresponding to the new version of the bundle file
- the patch file is merged with the current version of the bundle file to obtain a merged new version of the bundle file;
- the first check code is compared with the second check code. If the difference is different, the patch file fails to be loaded, and the merged new version of the bundle file is rolled back to the current version of the bundle file.
- the readable storage medium which when executed, may include the flow of an embodiment of the methods as described above.
- the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
Description
Claims (18)
- 一种应用程序热更新方法,包括:启动应用程序,加载映射文件和多个当前版本资源文件包;所述映射文件中记录了业务功能标识和对应的资源文件包标识;生成版本更新请求,将所述版本更新请求发送至服务器;以使得服务器根据所述版本更新请求查询是否存在新版本对应的更新文件,若存在,则获取所述更新文件;接收服务器返回的更新文件,所述更新文件包括多个新版本资源文件包,所述新版本资源文件包具有所述资源文件包标识;利用所述映射文件动态加载与业务功能标识对应的新版本资源文件包;若检测到新版本资源文件包加载失败,则向当前版本资源文件包进行回滚。
- 根据权利要求1所述的方法,其特征在于,所述更新文件包括新版本图片,所述方法还包括:当应用程序启动时,加载本地的透明图片;当接收到更新文件时,在所述更新文件获取应用程序对应的图片更新路径;根据所述图片更新路径查询所述更新文件中是否存在新版本图片;若存在,则获取新版本图片,利用所述新版本图片覆盖透明图片进行图片更新。
- 根据权利要求1所述的方法,其特征在于,所述利用所述映射文件动态加载与业务功能标识对应的新版本资源文件包的步骤包括:获取业务功能对应的动态引用方法;获取多个业务功能之间的依赖关系;利用所述动态引用方法和所述依赖关系在映射文件中查询需要加载的 资源文件包标识;根据查询到的资源文件包标识获取新版本资源文件包,将新版本资源文件包进行动态加载。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:若应用程序发生崩溃,识别出现崩溃的业务功能,获取对应的业务功能标识;根据所述业务功能标识在映射文件中查询对应的资源文件包标识;根据查询到的资源文件包标识对发生崩溃的故障部位进行定位。
- 根据权利要求1所述的方法,其特征在于,所述当前版本资源文件包括当前版本bundle文件,所述新版资源文件包括新版本bundle文件对应的补丁文件;在所述利用所述映射文件动态加载与业务功能标识对应的新版本资源文件包的步骤之后,还包括:在所述更新文件中提取新版本bundle文件对应的第一校验码;将所述补丁文件与当前版本bundle文件进行合并,得到合并后的新版本bundle文件;计算所述合并后的新版本bundle文件对应的第二校验码;将所述第一校验码和第二校验码进行比较,若不同,则表示所述补丁文件加载失败,从合并后的新版本bundle文件回滚至当前版本bundle文件。
- 一种应用程序热更新装置,其特征在于,所述装置包括:启动模块,用于启动应用程序,加载映射文件和多个当前版本资源文件包;所述映射文件中记录了业务功能标识和对应的资源文件包标识;通信模块,用于生成版本更新请求,将所述版本更新请求发送至服务器;以使得服务器根据所述版本更新请求查询是否存在新版本对应的更新文件,若存在,则获取所述更新文件;接收服务器返回的更新文件,所述更新文件包括多个新版本资源文件包,所述新版本资源文件包具有所述资源文件包标识;动态加载模块,用于利用所述映射文件动态加载与业务功能标识对应的新版本资源文件包;回滚模块,用于若检测到新版本资源文件包加载失败,则向当前版本资源文件包进行回滚。
- 根据权利要求6所述的装置,其特征在于,所述更新文件包括新版本图片,所述启动模块还用于当应用程序启动时,加载本地的透明图片;所述动态加载模块还用于当接收到更新文件时,在所述更新文件获取应用程序对应的图片更新路径;根据所述图片更新路径查询所述更新文件中是否存在新版本图片;若存在,则获取新版本图片,利用所述新版本图片覆盖透明图片进行图片更新。
- 根据权利要求6所述的方法,其特征在于,所述动态加载模块还用于获取业务功能对应的动态引用方法;获取多个业务功能之间的依赖关系;利用所述动态引用方法和所述依赖关系在映射文件中查询需要加载的资源文件包标识;根据查询到的资源文件包标识获取新版本资源文件包,将新版本资源文件包进行动态加载。
- 一种终端,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时实现以下步骤:启动应用程序,加载映射文件和多个当前版本资源文件包;所述映射文件中记录了业务功能标识和对应的资源文件包标识;生成版本更新请求,将所述版本更新请求发送至服务器;以使得服务器根据所述版本更新请求查询是否存在新版本对应的更新文件,若存在,则获取所述更新文件;接收服务器返回的更新文件,所述更新文件包括多个新版本资源文件包,所述新版本资源文件包具有所述资源文件包标识;利用所述映射文件动态加载与业务功能标识对应的新版本资源文件包;若检测到新版本资源文件包加载失败,则向当前版本资源文件包进行回 滚。
- 根据权利要求1所述的终端,其特征在于,所述更新文件包括新版本图片,所述指令被所述处理器执行时还用于实现以下步骤:当应用程序启动时,加载本地的透明图片;当接收到更新文件时,在所述更新文件获取应用程序对应的图片更新路径;根据所述图片更新路径查询所述更新文件中是否存在新版本图片;若存在,则获取新版本图片,利用所述新版本图片覆盖透明图片进行图片更新。
- 根据权利要求1所述的终端,其特征在于,所述利用所述映射文件动态加载与业务功能标识对应的新版本资源文件包的步骤包括:获取业务功能对应的动态引用方法;获取多个业务功能之间的依赖关系;利用所述动态引用方法和所述依赖关系在映射文件中查询需要加载的资源文件包标识;根据查询到的资源文件包标识获取新版本资源文件包,将新版本资源文件包进行动态加载。
- 根据权利要求1所述的终端,其特征在于,所述指令被所述处理器执行时还用于实现以下步骤:若应用程序发生崩溃,识别出现崩溃的业务功能,获取对应的业务功能标识;根据所述业务功能标识在映射文件中查询对应的资源文件包标识;根据查询到的资源文件包标识对发生崩溃的故障部位进行定位。
- 根据权利要求1所述的终端,其特征在于,所述当前版本资源文件包括当前版本bundle文件,所述新版资源文件包括新版本bundle文件对应的补丁文件;在所述利用所述映射文件动态加载与业务功能标识对应的新版 本资源文件包的步骤之后,还包括:在所述更新文件中提取新版本bundle文件对应的第一校验码;将所述补丁文件与当前版本bundle文件进行合并,得到合并后的新版本bundle文件;计算所述合并后的新版本bundle文件对应的第二校验码;将所述第一校验码和第二校验码进行比较,若不同,则表示所述补丁文件加载失败,从合并后的新版本bundle文件回滚至当前版本bundle文件。
- 一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:启动应用程序,加载映射文件和多个当前版本资源文件包;所述映射文件中记录了业务功能标识和对应的资源文件包标识;生成版本更新请求,将所述版本更新请求发送至服务器;以使得服务器根据所述版本更新请求查询是否存在新版本对应的更新文件,若存在,则获取所述更新文件;接收服务器返回的更新文件,所述更新文件包括多个新版本资源文件包,所述新版本资源文件包具有所述资源文件包标识;利用所述映射文件动态加载与业务功能标识对应的新版本资源文件包;若检测到新版本资源文件包加载失败,则向当前版本资源文件包进行回滚。
- 根据权利要求14所述的存储介质,其特征在于,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器还执行以下步骤:当应用程序启动时,加载本地的透明图片;当接收到更新文件时,在所述更新文件获取应用程序对应的图片更新路径;根据所述图片更新路径查询所述更新文件中是否存在新版本图片;若存在,则获取新版本图片,利用所述新版本图片覆盖透明图片进行图片更新。
- 根据权利要求14所述的存储介质,其特征在于,所述利用所述映射文件动态加载与业务功能标识对应的新版本资源文件包的步骤包括:获取业务功能对应的动态引用方法;获取多个业务功能之间的依赖关系;利用所述动态引用方法和所述依赖关系在映射文件中查询需要加载的资源文件包标识;根据查询到的资源文件包标识获取新版本资源文件包,将新版本资源文件包进行动态加载。
- 根据权利要求14所述的存储介质,其特征在于,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器还执行以下步骤:若应用程序发生崩溃,识别出现崩溃的业务功能,获取对应的业务功能标识;根据所述业务功能标识在映射文件中查询对应的资源文件包标识;根据查询到的资源文件包标识对发生崩溃的故障部位进行定位。
- 根据权利要求14所述的存储介质,其特征在于,所述当前版本资源文件包括当前版本bundle文件,所述新版资源文件包括新版本bundle文件对应的补丁文件;在所述利用所述映射文件动态加载与业务功能标识对应的新版本资源文件包的步骤之后,还包括:在所述更新文件中提取新版本bundle文件对应的第一校验码;将所述补丁文件与当前版本bundle文件进行合并,得到合并后的新版本bundle文件;计算所述合并后的新版本bundle文件对应的第二校验码;将所述第一校验码和第二校验码进行比较,若不同,则表示所述补丁文件加载失败,从合并后的新版本bundle文件回滚至当前版本bundle文件。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710619237.1A CN107729041B (zh) | 2017-07-26 | 2017-07-26 | 应用程序热更新方法、装置、终端和存储介质 |
CN201710619237.1 | 2017-07-26 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019019643A1 true WO2019019643A1 (zh) | 2019-01-31 |
Family
ID=61201727
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/078315 WO2019019643A1 (zh) | 2017-07-26 | 2018-03-07 | 应用程序热更新方法、装置、终端和存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107729041B (zh) |
WO (1) | WO2019019643A1 (zh) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109976786A (zh) * | 2019-03-11 | 2019-07-05 | 宸瑞普惠(广州)科技有限公司 | 移动应用软件的热更新方法、服务器和移动终端 |
CN110187910A (zh) * | 2019-05-30 | 2019-08-30 | 腾讯科技(上海)有限公司 | 一种热更新方法、装置、设备及计算机可读存储介质 |
CN112988260A (zh) * | 2021-01-25 | 2021-06-18 | 杭州衣科云科技有限公司 | 应用冷启动优化方法、装置、计算机设备及存储介质 |
CN113076128A (zh) * | 2020-01-03 | 2021-07-06 | 北京猎户星空科技有限公司 | 用于机器人配置的方法、装置、电子设备及存储介质 |
CN113448611A (zh) * | 2021-08-31 | 2021-09-28 | 中邮消费金融有限公司 | 一种应用程序快速热更新的方法及系统 |
Families Citing this family (37)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110321139B (zh) * | 2018-03-29 | 2023-06-23 | 阿里巴巴(中国)有限公司 | 数据管理方法和系统 |
CN108762800A (zh) * | 2018-05-23 | 2018-11-06 | 北京五八信息技术有限公司 | 应用程序的动态更新方法和装置 |
CN109032631B (zh) * | 2018-07-12 | 2020-12-18 | 腾讯科技(深圳)有限公司 | 应用程序补丁包获取方法、装置、计算机设备及存储介质 |
CN109002314A (zh) * | 2018-09-29 | 2018-12-14 | 深圳市元征科技股份有限公司 | 软件更新方法、装置、电子设备及存储介质 |
CN109343880B (zh) * | 2018-09-29 | 2022-05-13 | 武汉斗鱼网络科技有限公司 | 一种rn包更新方法、装置及可读存储介质 |
CN109491695B (zh) * | 2018-10-19 | 2021-08-06 | 华南理工大学 | 一种集成安卓应用的增量更新方法 |
CN111274433A (zh) * | 2018-11-20 | 2020-06-12 | 比亚迪股份有限公司 | 语音资源库的更新方法及装置 |
CN109783130A (zh) * | 2018-12-14 | 2019-05-21 | 深圳市创梦天地科技有限公司 | 一种前端项目的打包方法及服务器 |
CN109683937A (zh) * | 2018-12-26 | 2019-04-26 | 斑马网络技术有限公司 | 更新方法、装置和存储介质 |
CN109857432B (zh) * | 2019-01-14 | 2022-05-20 | 珠海金山网络游戏科技有限公司 | 一种游戏应用的热更新方法和装置 |
CN111679842B (zh) * | 2019-03-11 | 2023-06-23 | 阿里巴巴集团控股有限公司 | 应用程序热更新处理方法、装置及系统 |
CN109918112B (zh) * | 2019-03-15 | 2022-10-04 | 网易(杭州)网络有限公司 | 游戏热更新方法、装置和存储介质 |
CN109992284A (zh) * | 2019-03-29 | 2019-07-09 | 北京金山安全软件有限公司 | 一种热更新程序的提供方法、装置及电子设备 |
CN110162725A (zh) * | 2019-04-10 | 2019-08-23 | 浙江口碑网络技术有限公司 | 在线页面加载方法、装置、存储介质及计算机设备 |
CN110138833B (zh) * | 2019-04-12 | 2023-05-30 | 中国平安人寿保险股份有限公司 | APP中React Native模块的快速调试方法、装置、介质和设备 |
CN110096295B (zh) * | 2019-05-08 | 2023-08-08 | 吉旗(成都)科技有限公司 | 基于ReactNative的多模块移动应用的热更新方法及系统 |
CN110278115B (zh) | 2019-06-20 | 2022-11-08 | 京东方科技集团股份有限公司 | 热更新方法及装置 |
CN110262825B (zh) * | 2019-06-24 | 2023-12-05 | 北京字节跳动网络技术有限公司 | 热更新方法、装置、电子设备及可读存储介质 |
CN110286927A (zh) * | 2019-06-24 | 2019-09-27 | 北京字节跳动网络技术有限公司 | Flutter应用的热更新方法、装置及设备 |
CN110554963B (zh) * | 2019-08-26 | 2023-07-25 | 北京城市网邻信息技术有限公司 | 一种应用回滚方法、装置及存储介质 |
CN110727581B (zh) * | 2019-09-06 | 2024-04-05 | 网宿科技股份有限公司 | 崩溃定位方法与电子设备 |
CN110764815A (zh) * | 2019-09-26 | 2020-02-07 | 北京网聘咨询有限公司 | Web API项目发布方法及装置 |
CN110727895B (zh) * | 2019-10-09 | 2022-07-22 | 北京达佳互联信息技术有限公司 | 一种敏感词发送方法、装置、电子设备及存储介质 |
US10929122B1 (en) * | 2019-10-23 | 2021-02-23 | Microsoft Technology Licensing, Llc | Modifying program modules in running applications |
CN111090442B (zh) * | 2019-11-11 | 2023-07-14 | 腾讯音乐娱乐科技(深圳)有限公司 | 一种应用更新方法、装置和存储介质 |
CN111338666A (zh) * | 2020-02-10 | 2020-06-26 | 北京字节跳动网络技术有限公司 | 一种实现应用程序升级的方法、装置、介质和电子设备 |
CN111368242B (zh) * | 2020-03-09 | 2022-07-08 | 思必驰科技股份有限公司 | 语义资源发布系统及方法和自然语言处理装置及方法 |
CN113495737B (zh) * | 2020-04-01 | 2024-05-03 | 腾讯科技(深圳)有限公司 | 一种软件更新方法及相关设备 |
CN111694582A (zh) * | 2020-04-28 | 2020-09-22 | 中国平安人寿保险股份有限公司 | 应用程序资源包的处理方法、装置、设备及可读存储介质 |
CN112256295A (zh) * | 2020-09-21 | 2021-01-22 | 北京达佳互联信息技术有限公司 | 应用程序的更新方法、装置、设备和存储介质 |
CN112363717B (zh) * | 2020-10-29 | 2024-01-12 | 福建联迪商用设备有限公司 | 一种单个软件中加载不同功能的方法及终端 |
CN112486520A (zh) * | 2020-12-07 | 2021-03-12 | 深圳市欢太科技有限公司 | 应用程序升级方法及其装置、移动终端和服务器 |
CN112596772A (zh) * | 2020-12-15 | 2021-04-02 | 上海米哈游网络科技股份有限公司 | 服务器更新方法、装置、电子设备和存储介质 |
CN112783522B (zh) * | 2020-12-28 | 2022-08-09 | 北京五八信息技术有限公司 | 文件的加载方法、文件的加载装置及电子设备 |
CN113656107A (zh) * | 2021-08-23 | 2021-11-16 | 天津中新智冠信息技术有限公司 | 移动应用的加载方法、装置及电子设备 |
CN113961269A (zh) * | 2021-10-22 | 2022-01-21 | 深圳依时货拉拉科技有限公司 | 应用程序的运行控制方法及装置、计算机设备及存储介质 |
CN114466026B (zh) * | 2022-01-05 | 2024-05-14 | 杭州网易云音乐科技有限公司 | 应用程序接口的更新方法、装置、存储介质和计算设备 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105260209A (zh) * | 2015-10-20 | 2016-01-20 | 珠海金山网络游戏科技有限公司 | 一种程序热更新解决方法 |
CN105677415A (zh) * | 2016-01-06 | 2016-06-15 | 网易(杭州)网络有限公司 | 热更新方法及装置 |
CN106059844A (zh) * | 2016-08-17 | 2016-10-26 | 洑云龙 | 一种客户端热更新方法 |
CN106789249A (zh) * | 2016-12-22 | 2017-05-31 | 北京五八信息技术有限公司 | 热更新方法、客户端及服务器 |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
BR112014012772A8 (pt) * | 2011-12-01 | 2017-06-20 | Tencent Tech Shenzhen Co Ltd | método e sistema para aprimorar software |
-
2017
- 2017-07-26 CN CN201710619237.1A patent/CN107729041B/zh active Active
-
2018
- 2018-03-07 WO PCT/CN2018/078315 patent/WO2019019643A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105260209A (zh) * | 2015-10-20 | 2016-01-20 | 珠海金山网络游戏科技有限公司 | 一种程序热更新解决方法 |
CN105677415A (zh) * | 2016-01-06 | 2016-06-15 | 网易(杭州)网络有限公司 | 热更新方法及装置 |
CN106059844A (zh) * | 2016-08-17 | 2016-10-26 | 洑云龙 | 一种客户端热更新方法 |
CN106789249A (zh) * | 2016-12-22 | 2017-05-31 | 北京五八信息技术有限公司 | 热更新方法、客户端及服务器 |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109976786A (zh) * | 2019-03-11 | 2019-07-05 | 宸瑞普惠(广州)科技有限公司 | 移动应用软件的热更新方法、服务器和移动终端 |
CN110187910A (zh) * | 2019-05-30 | 2019-08-30 | 腾讯科技(上海)有限公司 | 一种热更新方法、装置、设备及计算机可读存储介质 |
CN110187910B (zh) * | 2019-05-30 | 2023-09-05 | 腾讯科技(上海)有限公司 | 一种热更新方法、装置、设备及计算机可读存储介质 |
CN113076128A (zh) * | 2020-01-03 | 2021-07-06 | 北京猎户星空科技有限公司 | 用于机器人配置的方法、装置、电子设备及存储介质 |
CN113076128B (zh) * | 2020-01-03 | 2023-11-10 | 北京猎户星空科技有限公司 | 用于机器人配置的方法、装置、电子设备及存储介质 |
CN112988260A (zh) * | 2021-01-25 | 2021-06-18 | 杭州衣科云科技有限公司 | 应用冷启动优化方法、装置、计算机设备及存储介质 |
CN113448611A (zh) * | 2021-08-31 | 2021-09-28 | 中邮消费金融有限公司 | 一种应用程序快速热更新的方法及系统 |
CN113448611B (zh) * | 2021-08-31 | 2021-11-30 | 中邮消费金融有限公司 | 一种应用程序快速热更新的方法及系统 |
Also Published As
Publication number | Publication date |
---|---|
CN107729041B (zh) | 2020-10-20 |
CN107729041A (zh) | 2018-02-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019019643A1 (zh) | 应用程序热更新方法、装置、终端和存储介质 | |
US9436556B2 (en) | Customizable storage system for virtual databases | |
US8495609B2 (en) | Methods, systems, and computer program products for taking a snapshot of installed software on a data processing system as part of a software update process | |
EP2751662B1 (en) | Method for an efficient application disaster recovery | |
WO2019019668A1 (zh) | 应用程序启动方法、装置、计算机设备和存储介质 | |
US20170177452A1 (en) | Computing device replication using file system change detection methods and systems | |
WO2022111097A1 (zh) | 一种文件更新方法及装置、设备、存储介质 | |
US11409614B2 (en) | Systems and methods for multiple recovery types using single backup type | |
CN113419766B (zh) | 智能更新程序逻辑的方法、装置、设备及存储介质 | |
US11507473B2 (en) | System and method for efficient backup generation | |
US20130067447A1 (en) | State Machine Based Package Installation | |
US10558528B2 (en) | Reconstruction of system definitional and state information | |
CN116339908A (zh) | 虚拟机启动方法、装置、计算机设备和存储介质 | |
WO2022083190A1 (zh) | 数据下载方法、装置、计算机设备和存储介质 | |
US11720450B2 (en) | Virtual machine file retrieval from data store | |
CN114201207A (zh) | 一种资源同步方法、装置、电子设备及存储介质 | |
CN108259613B (zh) | 容灾数据的在线同步装置、方法及计算机可读存储介质 | |
CN112596954A (zh) | 数据备份及重建方法、装置、设备及存储介质 | |
US11720345B2 (en) | Pull based inner-loop code deployment | |
US11966723B2 (en) | Automatic management of applications in a containerized environment | |
US20230143903A1 (en) | Method and system for idempotent synthetic full backups in storage devices | |
US11704043B1 (en) | Backup and/or restore as a service | |
US20230074216A1 (en) | System and method for preserving access control lists in storage devices | |
US20230229566A1 (en) | Methods and systems of scanning for resources for resource classification in a multi cloud environment | |
US20220342686A1 (en) | Virtual machine file management using file-level snapshots |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18838595 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18838595 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 28.05.2020) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18838595 Country of ref document: EP Kind code of ref document: A1 |