CN110096295B - Multi-module mobile application thermal updating method and system based on reactivating - Google Patents

Multi-module mobile application thermal updating method and system based on reactivating Download PDF

Info

Publication number
CN110096295B
CN110096295B CN201910379464.0A CN201910379464A CN110096295B CN 110096295 B CN110096295 B CN 110096295B CN 201910379464 A CN201910379464 A CN 201910379464A CN 110096295 B CN110096295 B CN 110096295B
Authority
CN
China
Prior art keywords
server
jsbundle
module
mobile application
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910379464.0A
Other languages
Chinese (zh)
Other versions
CN110096295A (en
Inventor
赖雪菲
李响
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiqi Chengdu Technology Co ltd
Original Assignee
Jiqi Chengdu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiqi Chengdu Technology Co ltd filed Critical Jiqi Chengdu Technology Co ltd
Priority to CN201910379464.0A priority Critical patent/CN110096295B/en
Publication of CN110096295A publication Critical patent/CN110096295A/en
Application granted granted Critical
Publication of CN110096295B publication Critical patent/CN110096295B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a heat updating method and a heat updating system for multi-module mobile application based on reactivating. In the method, the client can perform thermal update by utilizing local cache files or built-in files aiming at different reactivative modules, and even if module resource acquisition fails due to reasons such as network, the latest resource file in the cache can be acquired to perform interface data rendering, and the server can accurately issue updated resources for the modules according to the request of the client, so that the version update of the App can be more rapidly performed, the on-line problem can be solved in time, and a user can experience the function of the App with a new version without downloading the new version again.

Description

Multi-module mobile application thermal updating method and system based on reactivating
Technical Field
The invention relates to the technical field of networks, in particular to a multi-module mobile application heat updating method and system based on reactivating.
Background
Mobile internet is a general term for combining mobile communication and internet, which refers to the activities of combining and practicing internet technology, platform, business model and application with mobile communication technology. In the current mobile internet age, mobile applications almost face the same problems as Web applications, namely, no cross-platform, slow version convergence, no timely repair of on-line problems, slow iteration of requirements, and the like. However, mobile applications cannot be completely converted into Web applications, so that App has become a trend. There are various schemes for the dynamic state of App, and reactivating is a representative one. In order to more rapidly update the version of the App and solve the online problem in time, so that a user can experience the function of the App with the new version without downloading the new version again, a hot update method and a hot update system for multi-module mobile application based on reactive are needed to be provided.
Disclosure of Invention
The invention provides a hot updating method and a hot updating system for multi-module mobile application based on reactivative, which can update the version of an App more rapidly and solve the problem on line in time, so that a user can experience the function of a new version of the App without downloading the new version again.
In a first aspect, the present invention provides a method for hot update of a multi-module mobile application based on reactivating, applied to a client, the method comprising the steps of:
a reactivating module for entering mobile application;
loading jsbundle files and resource files of the mobile application;
according to the jsbundle file and the resource file, requesting hot update configuration information of the reactive module from a server, wherein the hot update configuration information comprises the following parameters: the unique identification of the module, the application version number, the jsbundle version number and the Md5 value of the jsbundle;
receiving hot update configuration information returned by a server;
downloading the hot update resource according to the hot update configuration information;
decompressing the hot update resource;
and caching the decompressed hot update resources into a sandbox path of the mobile application.
With reference to the first aspect, in a first implementation manner of the first aspect, loading the jsbundle file and the resource file of the mobile application includes:
detecting whether a jsbundle file and a resource file of the reactive module are cached in a sand box of the mobile application;
if the jsbundle file and the resource file of the reactive module are cached in the sandbox of the mobile application, loading the cached jsbundle file and the cached resource file;
if the jsbundle file and the resource file of the reactive module are not cached in the sandbox of the mobile application, loading the jsbundle file and the resource file which are built in the mobile application.
With reference to the first aspect, in a second implementation manner of the first aspect, loading the cached jsbundle file and the resource file includes:
copying the file of the reactivative module into a currentReadedModule file;
returning the copied file path;
reading the jsbundle file and the resource file in the copied file path comprises performing interface rendering.
With reference to the first aspect, in a third implementation manner of the first aspect, after buffering the decompressed hot update resource in a sandbox path of the mobile application, the method further includes:
identifying whether the reactivative module needs forced updating;
and refreshing the reactivating module if the reactivating module needs to be forcedly updated.
With reference to the third implementation manner of the first aspect, in a fourth implementation manner of the first aspect, refreshing the reactive module includes:
uploading a request for refreshing the page to a server, wherein the request for refreshing the page carries request parameters, so that the server inquires data and complementary data generated in an unrefreshed period according to the request parameters, judges whether the data quantity of the data and the complementary data generated in the unrefreshed period exceeds a preset maximum data quantity, and returns data to a client and carries more data identifiers in the returned data when the data quantity of the data and the complementary data generated in the unrefreshed period exceeds the preset maximum data quantity;
receiving data returned by a server;
judging whether more data are not transmitted back according to the identification in the data returned by the server;
if more data are not returned, removing all data in the local cache, which are earlier than the earliest generation time, according to the earliest generation time of the data returned by the server;
the rest data are cached in a local database;
and refreshing the display interface.
With reference to the fourth implementation manner of the first aspect, in a fifth implementation manner of the first aspect, the method further includes:
uploading a request for loading more data to a server, wherein the request for loading more data carries the earliest occurrence time in the current interface display data of the client, so that the server searches for data earlier than the earliest occurrence time and returns the data earlier than the earliest occurrence time to the client;
receiving data which is returned by the server and is earlier than the earliest occurrence time;
caching data earlier than the earliest occurrence time in a local database;
and refreshing the display interface.
In a second aspect, the present invention provides a method for hot update of a multi-module mobile application based on reactivating, applied to a server, the method comprising the steps of:
receiving a request for carrying out hot update on configuration information of a mobile application reactive module, wherein the request for carrying the hot update carries the following parameters: the unique identification of the module, the application version number, the jsbundle version number and the Md5 value of the jsbundle;
inquiring the latest resources started in the database of the server according to the unique identification of the module;
identifying whether the latest resource exists;
if the latest resource does not exist, returning request failure information to the client;
if the latest resource exists, judging whether the application version number carried in the request is greater than or equal to the currently configured application version number in the database of the server;
and if the application version number carried in the request is greater than or equal to the application version number currently configured in the database of the server, returning the configuration information of the mobile application reactive module currently configured in the database of the server to the client so as to enable the client to perform hot update on the configuration information of the mobile application reactive module.
With reference to the second aspect, in a first implementation manner of the second aspect, if the application version number carried in the request is not greater than or equal to the currently configured application version number in the database of the server, determining whether the jsbundle version number carried in the request is greater than or equal to the currently configured jsbundle version number in the database of the server;
and if the jsbundle version number carried in the request is greater than or equal to the jsbundle version number currently configured in the database of the server, returning the configuration information of the mobile application reactive module currently configured in the database of the server to the client so as to enable the client to perform hot update on the configuration information of the mobile application reactive module.
With reference to the first implementation manner of the second aspect, in a second implementation manner of the second aspect, if the jsbundle version number carried in the request is not greater than or equal to the jsbundle version number currently configured in the database of the server, determining whether the Md5 value of the jsbundle carried in the request is greater than or equal to the Md5 value of the jsbundle currently configured in the database of the server;
if the Md5 value of the jsbundle carried in the request is greater than or equal to the Md5 value of the jsbundle currently configured in the database, returning the configuration information of the mobile application reactive module currently configured in the database of the server to the client so as to enable the client to perform thermal update on the configuration information of the mobile application reactive module;
if the Md5 value of the jsbundle carried in the request is not greater than or equal to the Md5 value of the jsbundle currently configured in the database of the server, the configuration information of the mobile application reactive module currently configured in the database of the server is returned to the client so that the client does not perform hot update on the configuration information of the mobile application reactive module.
In a third aspect, the present invention provides a hot update system for a multi-module mobile application based on reactivating, the system comprising a client and a server;
the client is used for entering a reactivative module of a mobile application, loading a jsbundle file and a resource file of the mobile application, and requesting hot update configuration information of the reactivative module from a server according to the jsbundle file and the resource file, wherein the hot update configuration information comprises the following parameters: the method comprises the steps of receiving hot update configuration information returned by a server, downloading hot update resources according to the hot update configuration information, decompressing the hot update resources, and caching the decompressed hot update resources into a sandbox path of the mobile application, wherein the hot update resources comprise a module unique identifier, an application version number, a jsbundle version number and an Md5 value of the jsbundle;
the server is configured to receive a request for performing a thermal update on configuration information of a mobile application reactive module, where the request for performing the thermal update is uploaded by a client, and the request for performing the thermal update carries the following parameters: the method comprises the steps of inquiring latest resources started in a database of a server according to a module unique identifier, an application version number, a jsbundle version number and an Md5 value of the jsbundle, identifying whether the latest resources exist, returning request failure information to a client if the latest resources do not exist, judging whether the application version number carried in the request is greater than or equal to the application version number currently configured in the database of the server if the latest resources exist, and returning configuration information of a mobile application reactivative module currently configured in the database of the server to the client if the application version number carried in the request is greater than or equal to the application version number currently configured in the database of the server, so that the client carries out hot update on the configuration information of the mobile application reactivative module.
According to the technical scheme, according to the hot updating method and the hot updating system for the multi-module mobile application based on the reactivative, the client can perform hot updating by utilizing the local cache file or the built-in file according to different reactivative modules, even if module resource acquisition fails due to network reasons and the like, the server can acquire the nearest resource file in the cache to perform interface data rendering, the server can accurately issue updated resources for the modules according to the request of the client, the version updating of the App can be performed more quickly, the problem of on-line is solved in time, and a user can experience the function of the new version without downloading the new version again.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings that are needed in the embodiments will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flowchart of an embodiment of a method for hot update of a multi-module mobile application based on reactive according to the present invention.
Fig. 2 is a flowchart of step S102.
Fig. 3 is a flowchart of step S202.
Fig. 4 is a flowchart of an implementation manner of the hot update method of the multi-module mobile application based on reactivating provided by the invention.
Fig. 5 is a flowchart of refreshing a page by a hot update method of a multi-module mobile application based on reactivating provided by the invention.
Fig. 6 is a flowchart of loading more data according to the hot update method of the multi-module mobile application based on reactivating provided by the invention.
Fig. 7 is a flowchart of another embodiment of a method for hot update of a multi-module mobile application based on reactivating provided by the present invention.
Fig. 8 is a schematic diagram of a thermal update system for a multi-module mobile application based on reactivating provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to specific embodiments of the present invention and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention. The following describes in detail the technical solutions provided by the embodiments of the present invention with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a first embodiment of a reactive multi-module mobile application-based hot update method is provided, and the method can be applied to hot update of an App on a client running iOS and Android operating systems.
In this embodiment, the hot update is to update resource files such as application codes and pictures according to requirements or bug, so that the user can use the latest version function without upgrading and installing the new version. The reactionary module compresses all JS codes and pictures into a jsbundle file and a resource file according to the platform. And the reactionary application under multiple modules generates corresponding files of different modules. The server is responsible for managing these files and issuing hot update configurations for the corresponding modules according to the parameters passed by the client request. And the client downloads the latest resource data of the updating module according to the returned configuration information, and the client can be a smart phone. When the client needs to update a certain module of the App, the module version, the data cache, the hot update configuration acquisition, the final data refresh and the like need to be considered.
The invention provides a heat updating method for multi-module mobile application based on reactivating, which comprises the following steps:
step S101, a reactive module of the mobile application is entered.
Step S102, loading the jsbundle file and the resource file of the mobile application.
As shown in fig. 2, the jsbundle file and the resource file for loading the mobile application may specifically include:
step S201, detecting whether a jsbundle file and a resource file of the reactive module are cached in the sandbox of the mobile application.
Step S202, if the jsbundle file and the resource file of the reactive module are cached in the sandbox of the mobile application, the cached jsbundle file and resource file are loaded.
In step S203, if the jsbundle file and the resource file of the reactive module are not cached in the sandbox of the mobile application, the jsbundle file and the resource file built in the mobile application, for example, the jsbundle file and the resource file built in the mobile application in ipa or apk format are loaded, so that even if the module resource acquisition fails due to reasons such as a network, the latest resource file in the cache can be acquired to perform interface data rendering.
As shown in fig. 3, further, loading the cached jsbundle file and the resource file may specifically include:
step S301, copying the file of the reactive module to the currentReadedModule file.
Step S302, returning the copied file path.
Step S303, reading the jsbundle file and the resource file in the copied file path comprises performing interface rendering. The purpose of this is to avoid the condition that the file is disordered and deadlocked due to the simultaneous read-write operation of a certain module file.
Step S103, according to the jsbundle file and the resource file, requesting the hot update configuration information of the reactive module from a server, wherein the hot update configuration information comprises the following parameters: the Module unique identifier (English: module Id), the application Version number (English: app Version), the jsbundle Version number (English: package Version), and the Md5 value of jsbundle (English: package Md 5), and the server returns the configuration of the Module according to the parameters, including information about whether update is needed or not.
Step S104, the hot update configuration information returned by the server is received.
Step S105, downloading the hot update resource according to the hot update configuration information.
Step S106, decompressing the hot update resource.
Specifically, if decompression is unsuccessful, the remaining file may be removed.
Step S107, caching the decompressed hot update resources into a sandbox path of the mobile application.
Specifically, in this embodiment, the cached file directory structure may be as follows: firstly, the iOS operating system is a Library directory, and the Android operating system is a file directory. The Library directory or file directory contains an app name, i.e., an application name directory. The app name directory contains directories such as 001 and 002, and a module ID directory. 001. And 002, etc., respectively containing assets, namely resources such as pictures, etc. Jsbundle, i.e., compressed code file. And config, i.e., configuration information of resources. The Library directory or the files directory also contains a currentReadModulator directory for storing the resources being read.
Referring to fig. 4, in an alternative embodiment of the present invention, after buffering the decompressed hot update resource in the sandboxed path of the mobile application, the method may further include:
step S401, identifying whether the reactive module needs to be forcedly updated.
Step S402, if the reactive module needs to be forcedly updated, refreshing the reactive module.
As shown in fig. 5, refreshing the reactive module may specifically include:
step S501, uploading a request for refreshing a page to a server, where the request for refreshing the page carries a request parameter, so that the server queries data and complementary data generated in an unrefreshed period according to the request parameter, determines whether the data amounts of the data and the complementary data generated in the unrefreshed period exceed a preset maximum data amount, and returns data to a client and carries an identifier of more data in the returned data when the data amounts of the data and the complementary data generated in the unrefreshed period exceed the preset maximum data amount.
Specifically, the client typically refreshes for a pull-down or first time a page is entered. The parameters uploaded by the client may include the earliest time of occurrence in the local cache data and the largest unique sequentially incremented field value in the local cache data. If no cache exists, the earliest occurrence time in the local cache data is not uploaded, and if no cache exists, the largest unique ordered increment field value in the local cache data is not uploaded.
After the server receives the parameter uploaded by the client, the server can inquire that the data occurrence time is later than the earliest occurrence time of the client, the unique orderly-increased field value is larger than the corresponding value of the largest unique orderly-increased field value in the local cache data transmitted by the client, and if the inquired data of the corresponding values is more than the agreed maximum data number, the server returns the identifier of more data in the parameter.
Step S502, data returned by the server is received.
Step S503, according to the identification in the data returned by the server, judging whether more data are not returned.
In step S504, if more data is not returned, all data in the local cache earlier than the earliest generation time is removed according to the earliest generation time of the data returned by the server. Other data are normally displayed. If no more data is not transmitted back, the data is displayed on the interface from late to early according to the generation time of the data.
In step S505, the rest of the data is cached in the local database.
Step S506, refreshing the display interface.
Further, referring to fig. 6, the method may further include the step of, when loading more data:
step S601, uploading a request for loading more data to a server, wherein the request for loading more data carries the earliest occurrence time in the current interface display data of the client, so that the server searches for the data earlier than the earliest occurrence time and returns the data earlier than the earliest occurrence time to the client.
In particular, clients typically load more data for pull-ups.
In step S602, data returned by the server and earlier than the earliest occurrence time is received.
Step S603, caching the data earlier than the earliest occurrence time in the local database.
Step S604, the display interface is refreshed.
In addition, the invention can realize a set of visual front-end operation interface (H5 page), and can add optional configuration of resources and parameters. And according to the resource uploading interface, resource uploading management of different modules of different applications is realized. Wherein the configurable parameters are as follows: resource type (corresponding module id), name (application version number), description (jsbundle version number), version, lowest adapted application version, platform (iOS/Android), whether to force an update, resource package (zip file) and whether the resource is enabled. And the visualized operation interface simplifies the uploading flow of the hot update resource. The test and operation can fill in configuration parameters according to the requirements, and upload files. Meanwhile, user permission can be configured, and operation management on the hot update file is facilitated.
Referring to fig. 7, a method for hot update of a multi-module mobile application based on reactivating is applied to a server, and the method may include the following steps:
step S701, receiving a request for performing a thermal update on configuration information of a mobile application reactive module, where the request for performing the thermal update is uploaded by a client, and the request for performing the thermal update carries the following parameters: module unique identification, application version number, jsbundle version number, and Md5 value of jsbundle.
Step S702, according to the unique identification of the module, inquiring the latest resources which are started in the database of the server.
Step S703, identifying whether the latest resource exists. And if the latest resource does not exist, returning request failure information to the client.
If the latest resource exists, step S704 is executed to determine whether the application version number carried in the request is greater than or equal to the currently configured application version number in the database of the server.
Step S704, if the application version number carried in the request is greater than or equal to the application version number currently configured in the database of the server, step S707 is executed, and the configuration information of the mobile application reactive module currently configured in the database of the server is returned to the client, so that the client performs a thermal update on the configuration information of the mobile application reactive module.
If the application version number carried in the request is not greater than or equal to the currently configured application version number in the database of the server, executing step S705, and determining whether the jsbundle version number carried in the request is greater than or equal to the jsbundle version number currently configured in the database of the server.
If the jsbundle version number carried in the request is greater than or equal to the jsbundle version number currently configured in the database of the server, step S707 is executed, and the configuration information of the mobile application reactive module currently configured in the database of the server is returned to the client, so that the client performs hot update on the configuration information of the mobile application reactive module.
If the jsbundle version number carried in the request is not greater than or equal to the jsbundle version number currently configured in the database of the server, executing step S706, and determining whether the Md5 value of the jsbundle carried in the request is greater than or equal to the Md5 value of the jsbundle currently configured in the database of the server.
If the Md5 value of the jsbundle carried in the request is greater than or equal to the Md5 value of the jsbundle currently configured in the database, step S707 is executed, and the configuration information of the mobile application reactive module currently configured in the database of the server is returned to the client, so that the client performs a hot update on the configuration information of the mobile application reactive module.
If the Md5 value of the jsbundle carried in the request is not greater than or equal to the Md5 value of the jsbundle currently configured in the database of the server, step S708 is executed, and the configuration information of the mobile application reactive module currently configured in the database of the server is returned to the client, so that the client does not perform thermal update on the configuration information of the mobile application reactive module.
Referring to fig. 8, the present invention further provides a hot update system for multi-module mobile applications based on reactivating, which includes a client 81 and a server 82.
The client 81 is configured to enter a reactive module of the mobile application, load a jsbundle file and a resource file of the mobile application, and request, according to the jsbundle file and the resource file, hot update configuration information of the reactive module to a server, where the hot update configuration information includes the following parameters: the method comprises the steps of receiving hot update configuration information returned by a server, downloading hot update resources according to the hot update configuration information, decompressing the hot update resources, and caching the decompressed hot update resources into a sandbox path of a mobile application, wherein the hot update resources comprise a module unique identifier, an application version number, a jsbundle version number and an Md5 value of the jsbundle.
The server 82 is configured to receive a request for performing a thermal update on configuration information of the mobile application reactive module, where the request for performing the thermal update carries the following parameters: the method comprises the steps of inquiring the latest resources started in a database of a server according to a module unique identifier, identifying whether the latest resources exist, returning request failure information to a client if the latest resources do not exist, judging whether an application version number carried in a request is greater than or equal to an application version number currently configured in the database of the server if the latest resources exist, and returning configuration information of a mobile application reactivative module currently configured in the database of the server to the client if the application version number carried in the request is greater than or equal to the application version number currently configured in the database of the server, so that the client can perform thermal update on the configuration information of the mobile application reactivative module.
In summary, according to the hot updating method and system based on the reactive multi-module provided by the embodiment of the invention, the client can perform hot updating by using the local cache file or the built-in file for different reactive modules, even if the module resource acquisition fails due to reasons such as a network, the server can acquire the nearest resource file in the cache to perform interface data rendering, and the server can accurately issue updated resources for the module according to the request of the client, so that the version update of the App can be performed more quickly, and the problem of online can be solved in time, and the user can experience the function of the new version App without downloading the new version again. And, the hot updating rule of the module is maintained by the server, and the rule can be changed in real time according to the requirement. And a visual uploading interface is realized, so that the resource uploading process is facilitated, and a manager can operate the hot update file conveniently.
The embodiment of the invention also provides a storage medium, and further provides a storage medium, wherein a computer program is stored in the storage medium, and when the computer program is executed by a processor, part or all of the steps in each embodiment of the hot updating method based on the reactive multi-module provided by the invention are realized. The storage medium may be a magnetic disk, an optical disk, a Read-only memory (ROM), a Random Access Memory (RAM), or the like.
It will be apparent to those skilled in the art that the techniques of embodiments of the present invention may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in essence or what contributes to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present invention.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for the thermal update system embodiment under the reactive multi-module, since it is substantially similar to the method embodiment, the description is relatively simple, and reference is made to the description in the method embodiment for the matters.
The embodiments of the present invention described above do not limit the scope of the present invention.

Claims (3)

1. A hot update method of a multi-module mobile application based on reactivating, applied to a client, characterized in that the method comprises the following steps:
a reactivating module for entering mobile application;
loading jsbundle files and resource files of the mobile application;
according to the jsbundle file and the resource file, requesting hot update configuration information of the reactive module from a server, wherein the hot update configuration information comprises the following parameters: the unique identification of the module, the application version number, the jsbundle version number and the Md5 value of the jsbundle;
receiving hot update configuration information returned by a server;
downloading the hot update resource according to the hot update configuration information;
decompressing the hot update resource;
caching the decompressed hot update resources into a sandbox path of the mobile application;
loading the jsbundle file and the resource file of the mobile application includes:
detecting whether a jsbundle file and a resource file of the reactive module are cached in a sand box of the mobile application; if the jsbundle file and the resource file of the reactive module are cached in the sandbox of the mobile application, loading the cached jsbundle file and the cached resource file;
if the jsbundle file and the resource file of the reactive module are not cached in the sandbox of the mobile application, loading the jsbundle file and the resource file which are built in the mobile application;
the loading of the cached jsbundle file and resource file includes:
copying the file of the reactivative module into a currentReadedModule file;
returning the copied file path;
reading the jsbundle file and the resource file in the copied file path comprises performing interface rendering;
after caching the decompressed hot update resource in a sandbox path of the mobile application, the method further comprises: identifying whether the reactivative module needs forced updating;
refreshing the reactivating module if the reactivating module needs to be forcedly updated
Refreshing the reactivating module includes:
uploading a request for refreshing the page to a server, wherein the request for refreshing the page carries request parameters, so that the server inquires data and complementary data generated in an unrefreshed period according to the request parameters, judges whether the data quantity of the data and the complementary data generated in the unrefreshed period exceeds a preset maximum data quantity, and returns data to a client and carries more data identifiers in the returned data when the data quantity of the data and the complementary data generated in the unrefreshed period exceeds the preset maximum data quantity;
receiving data returned by a server;
judging whether more data are not transmitted back according to the identification in the data returned by the server;
if more data are not returned, removing all data in the local cache, which are earlier than the earliest generation time, according to the earliest generation time of the data returned by the server;
the rest data are cached in a local database;
refreshing a display interface;
the method further comprises the steps of:
uploading a request for loading more data to a server, wherein the request for loading more data carries the earliest occurrence time in the current interface display data of the client, so that the server searches for data earlier than the earliest occurrence time and returns the data earlier than the earliest occurrence time to the client;
receiving data which is returned by the server and is earlier than the earliest occurrence time;
caching data earlier than the earliest occurrence time in a local database;
and refreshing the display interface.
2. A hot update method of a multi-module mobile application based on reactivating, applied to a server, characterized in that the method comprises the following steps:
receiving a request for carrying out hot update on configuration information of a mobile application reactive module, wherein the request for carrying the hot update carries the following parameters: the unique identification of the module, the application version number, the jsbundle version number and the Md5 value of the jsbundle;
inquiring the latest resources started in the database of the server according to the unique identification of the module;
identifying whether the latest resource exists;
if the latest resource does not exist, returning request failure information to the client;
if the latest resource exists, judging whether the application version number carried in the request is greater than or equal to the currently configured application version number in the database of the server;
if the application version number carried in the request is greater than or equal to the application version number currently configured in the database of the server, returning the configuration information of the mobile application reactive module currently configured in the database of the server to the client so that the client carries out hot update on the configuration information of the mobile application reactive module;
if the application version number carried in the request is not more than or equal to the currently configured application version number in the database of the server, judging whether the jsbundle version number carried in the request is more than or equal to the currently configured jsbundle version number in the database of the server;
if the jsbundle version number carried in the request is greater than or equal to the jsbundle version number currently configured in the database of the server, returning configuration information of the mobile application reactive module currently configured in the database of the server to the client so as to enable the client to perform hot update on the configuration information of the mobile application reactive module;
if the jsbundle version number carried in the request is not greater than or equal to the jsbundle version number currently configured in the database of the server, judging whether the Md5 value of the jsbundle carried in the request is greater than or equal to the Md5 value of the jsbundle currently configured in the database of the server;
if the Md5 value of the jsbundle carried in the request is greater than or equal to the Md5 value of the jsbundle currently configured in the database, returning the configuration information of the mobile application reactive module currently configured in the database of the server to the client so as to enable the client to perform thermal update on the configuration information of the mobile application reactive module;
if the Md5 value of the jsbundle carried in the request is not greater than or equal to the Md5 value of the jsbundle currently configured in the database of the server, the configuration information of the mobile application reactive module currently configured in the database of the server is returned to the client so that the client does not perform hot update on the configuration information of the mobile application reactive module.
3. A hot update system for a multi-module mobile application based on reactivating, the system comprising a client and a server;
the client is used for entering a reactivative module of a mobile application, loading a jsbundle file and a resource file of the mobile application, and requesting hot update configuration information of the reactivative module from a server according to the jsbundle file and the resource file, wherein the hot update configuration information comprises the following parameters: the method comprises the steps of receiving hot update configuration information returned by a server, downloading hot update resources according to the hot update configuration information, decompressing the hot update resources, and caching the decompressed hot update resources into a sandbox path of the mobile application, wherein the hot update resources comprise a module unique identifier, an application version number, a jsbundle version number and an Md5 value of the jsbundle;
the server is configured to receive a request for performing a thermal update on configuration information of a mobile application reactive module, where the request for performing the thermal update is uploaded by a client, and the request for performing the thermal update carries the following parameters: the method comprises the steps of inquiring latest resources started in a database of a server according to a module unique identifier, an application version number, a jsbundle version number and an Md5 value of the jsbundle, identifying whether the latest resources exist, returning request failure information to a client if the latest resources do not exist, judging whether the application version number carried in the request is greater than or equal to the application version number currently configured in the database of the server if the latest resources exist, and returning configuration information of a mobile application reactivative module currently configured in the database of the server to the client if the application version number carried in the request is greater than or equal to the application version number currently configured in the database of the server, so that the client carries out hot update on the configuration information of the mobile application reactivative module.
CN201910379464.0A 2019-05-08 2019-05-08 Multi-module mobile application thermal updating method and system based on reactivating Active CN110096295B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910379464.0A CN110096295B (en) 2019-05-08 2019-05-08 Multi-module mobile application thermal updating method and system based on reactivating

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910379464.0A CN110096295B (en) 2019-05-08 2019-05-08 Multi-module mobile application thermal updating method and system based on reactivating

Publications (2)

Publication Number Publication Date
CN110096295A CN110096295A (en) 2019-08-06
CN110096295B true CN110096295B (en) 2023-08-08

Family

ID=67447284

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910379464.0A Active CN110096295B (en) 2019-05-08 2019-05-08 Multi-module mobile application thermal updating method and system based on reactivating

Country Status (1)

Country Link
CN (1) CN110096295B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111562924B (en) * 2019-12-04 2022-07-08 江苏艾佳家居用品有限公司 Distributed mobile application running system and application method based on Reactnative
CN111355629B (en) * 2020-02-17 2021-01-15 苏州亿歌网络科技有限公司 Client test method and device, computer equipment and storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681825A (en) * 2011-03-09 2012-09-19 北京航空航天大学 System and method for managing service run container
CN102946442A (en) * 2012-12-06 2013-02-27 网宿科技股份有限公司 Method and system for updating and releasing file based on smart refreshing
CN103944958A (en) * 2014-03-14 2014-07-23 中国科学院计算技术研究所 Wide area file system and implementation method
CN104133695A (en) * 2014-07-15 2014-11-05 珠海金山网络游戏科技有限公司 Manufacture and application method of software client side
CN104735152A (en) * 2015-03-30 2015-06-24 四川神琥科技有限公司 Mail reading method based on network
CN106209926A (en) * 2015-04-30 2016-12-07 阿里巴巴集团控股有限公司 A kind of data-updating method and equipment
CN106657367A (en) * 2016-12-30 2017-05-10 北京三快在线科技有限公司 Service data acquisition method, device and system
CN107509086A (en) * 2017-09-06 2017-12-22 成都虫洞奇迹科技有限公司 Video reorientation method and device under a kind of cloud desktop
CN107729041A (en) * 2017-07-26 2018-02-23 上海壹账通金融科技有限公司 The hot update method of application program, device, terminal and storage medium
CN107861739A (en) * 2017-11-06 2018-03-30 山东浪潮通软信息科技有限公司 ReactNative applications method of adjustment, client and system
CN108304207A (en) * 2018-03-01 2018-07-20 上海找钢网信息科技股份有限公司 Mix the resource regeneration method and system of APP application programs
CN108733400A (en) * 2018-04-27 2018-11-02 新光互联投资管理有限公司 A kind of hot update method of App increments and service system
CN109032638A (en) * 2018-07-18 2018-12-18 广州宸瑞软件科技有限公司 Hot update method, server and the mobile terminal of mobile application software
CN109445833A (en) * 2018-11-09 2019-03-08 苏宁消费金融有限公司 A kind of method that React-native heat updates
CN109656611A (en) * 2018-12-24 2019-04-19 成都四方伟业软件股份有限公司 Three-dimensional visualization applies hot update method, device and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7640332B2 (en) * 2006-12-27 2009-12-29 Hewlett-Packard Development Company, L.P. System and method for hot deployment/redeployment in grid computing environment

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681825A (en) * 2011-03-09 2012-09-19 北京航空航天大学 System and method for managing service run container
CN102946442A (en) * 2012-12-06 2013-02-27 网宿科技股份有限公司 Method and system for updating and releasing file based on smart refreshing
CN103944958A (en) * 2014-03-14 2014-07-23 中国科学院计算技术研究所 Wide area file system and implementation method
CN104133695A (en) * 2014-07-15 2014-11-05 珠海金山网络游戏科技有限公司 Manufacture and application method of software client side
CN104735152A (en) * 2015-03-30 2015-06-24 四川神琥科技有限公司 Mail reading method based on network
CN106209926A (en) * 2015-04-30 2016-12-07 阿里巴巴集团控股有限公司 A kind of data-updating method and equipment
CN106657367A (en) * 2016-12-30 2017-05-10 北京三快在线科技有限公司 Service data acquisition method, device and system
CN107729041A (en) * 2017-07-26 2018-02-23 上海壹账通金融科技有限公司 The hot update method of application program, device, terminal and storage medium
CN107509086A (en) * 2017-09-06 2017-12-22 成都虫洞奇迹科技有限公司 Video reorientation method and device under a kind of cloud desktop
CN107861739A (en) * 2017-11-06 2018-03-30 山东浪潮通软信息科技有限公司 ReactNative applications method of adjustment, client and system
CN108304207A (en) * 2018-03-01 2018-07-20 上海找钢网信息科技股份有限公司 Mix the resource regeneration method and system of APP application programs
CN108733400A (en) * 2018-04-27 2018-11-02 新光互联投资管理有限公司 A kind of hot update method of App increments and service system
CN109032638A (en) * 2018-07-18 2018-12-18 广州宸瑞软件科技有限公司 Hot update method, server and the mobile terminal of mobile application software
CN109445833A (en) * 2018-11-09 2019-03-08 苏宁消费金融有限公司 A kind of method that React-native heat updates
CN109656611A (en) * 2018-12-24 2019-04-19 成都四方伟业软件股份有限公司 Three-dimensional visualization applies hot update method, device and terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Android热更新管理系统的研究与设计;张鑫;《中国优秀硕士学位论文全文数据库信息科技辑》(第2期);第I138-671页 *

Also Published As

Publication number Publication date
CN110096295A (en) 2019-08-06

Similar Documents

Publication Publication Date Title
JP6463393B2 (en) Tenant data recovery across tenant migration
CN103645910A (en) Methods for updating applications
JP2019517043A (en) Automatic update of hybrid application
KR20170049376A (en) Method and device for pulling out mirror image file for virtual machines
US8494888B2 (en) Offline modification of business data
CN105335253A (en) Method and device for creating virtual machine system disk snapshots
US20190155798A1 (en) Cache management
CN104113576A (en) Method and device for updating client
CN113094076A (en) Version iteration method, device, equipment and medium based on version control
US20160182673A1 (en) Dynamic cache injector
CN110096295B (en) Multi-module mobile application thermal updating method and system based on reactivating
US11099837B2 (en) Providing build avoidance without requiring local source code
CN110825425A (en) Configuration data management method and device, electronic equipment and storage medium
KR101638689B1 (en) System and method for providing client terminal to user customized synchronization service
CN113127430B (en) Mirror image information processing method, mirror image information processing device, computer readable medium and electronic equipment
CN117435569A (en) Dynamic capacity expansion method, device, equipment, medium and program product for cache system
CN112688980B (en) Resource distribution method and device, and computer equipment
CN104346101A (en) Dynamic storage space allocation system and method
CN114584576A (en) Data storage method, device, equipment, storage medium and computer program product
CN114385570A (en) Data synchronization method and device, electronic equipment and readable medium
CN112559568A (en) Virtual article determination method and device and computer readable storage medium
CN114189512B (en) Baseline code downloading method, device, terminal equipment and storage medium
CN114490544B (en) Method and device for downloading container mirror image by newly adding host
CN112114857B (en) Front-end service management method, front-end server and website server
CN112883009B (en) Method and device for processing data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant